From 8859cea3e6281acc618850b98149533cad299ed7 Mon Sep 17 00:00:00 2001 From: peter279k Date: Tue, 18 Dec 2018 23:12:32 +0800 Subject: [PATCH] Test enhancement --- .travis.yml | 5 +++-- composer.json | 4 ++-- tests/ScanTest.php | 6 +++--- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index 6b8921a..bd3634f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,8 +9,9 @@ php: - 7.0 - 7.1 - 7.2 + - 7.3 before_script: - - composer install --no-interaction --prefer-source --dev + - composer install --no-interaction --prefer-source -script: vendor/bin/phpunit --configuration phpunit.xml \ No newline at end of file +script: vendor/bin/phpunit diff --git a/composer.json b/composer.json index dae43e9..0c23bfb 100644 --- a/composer.json +++ b/composer.json @@ -23,7 +23,7 @@ "php": ">=5.4" }, "require-dev": { - "phpunit/phpunit": "^4.0" + "phpunit/phpunit": "^4.8 || ^5.7 || ^6.5" }, "autoload": { "psr-4": { @@ -35,4 +35,4 @@ "AntiMalware\\Tests\\": "tests/" } } -} \ No newline at end of file +} diff --git a/tests/ScanTest.php b/tests/ScanTest.php index 274e9d9..f78ab99 100644 --- a/tests/ScanTest.php +++ b/tests/ScanTest.php @@ -41,12 +41,12 @@ public function testScan() $result = $scanner->scanFile($file, false); if (strpos($file, '/samples/positive/') !== false) { - $this->assertTrue(!empty($result)); + $this->assertNotEmpty($result); } if (strpos($file, '/samples/negative/') !== false) { - $this->assertTrue(empty($result)); + $this->assertEmpty($result); } } } -} \ No newline at end of file +}