diff --git a/.travis.yml b/.travis.yml index 90a4d5bdc..648cbf653 100644 --- a/.travis.yml +++ b/.travis.yml @@ -28,7 +28,7 @@ before_script: - cd tests # run unit tests, create result file -script: phpunit --configuration phpunit.xml --coverage-text --coverage-clover=coverage.clover +script: ../vendor/bin/phpunit --configuration phpunit.xml --coverage-text --coverage-clover=coverage.clover # gets tools from Scrutinizer, uploads unit tests results to Scrutinizer (?) after_script: diff --git a/composer.json b/composer.json index 161e927c2..69b886108 100644 --- a/composer.json +++ b/composer.json @@ -9,7 +9,7 @@ "php": ">=5.5.0", "phpmailer/phpmailer": "~5.2", "gregwar/captcha": "~1.1", - "phpunit/phpunit": "~4.8" + "phpunit/phpunit": "4.8.*|5.7.*" }, "autoload": { "psr-4": { "": ["application/core/", "application/model/"] } diff --git a/tests/core/FilterTest.php b/tests/core/FilterTest.php index c92f88dae..10da9814c 100644 --- a/tests/core/FilterTest.php +++ b/tests/core/FilterTest.php @@ -18,9 +18,14 @@ public function testXSSFilterWithBadCode() */ public function testXSSFilterWithNonStringArguments() { - $this->assertEquals(123, 123); - $this->assertEquals(array(1, 2, 3), array(1, 2, 3)); - $this->assertEquals(17.001, 17.001); - $this->assertEquals(null, null); + $integer = 123; + $array = [1, 2, 3]; + $float = 17.001; + $null = null; + + $this->assertEquals($integer, Filter::XSSFilter($integer)); + $this->assertEquals($array, Filter::XSSFilter($array)); + $this->assertEquals($float, Filter::XSSFilter($float)); + $this->assertNull(Filter::XSSFilter($null)); } }