diff --git a/.travis.yml b/.travis.yml index 485fcf6e..8e831308 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,38 +12,26 @@ env: matrix: fast_finish: true include: - - php: 5.6 - env: - - DEPS=lowest - - php: 5.6 - env: - - DEPS=latest - - php: 7 - env: - - DEPS=lowest - - php: 7 - env: - - DEPS=latest - - php: 7.1 + - php: 7.3 env: - DEPS=lowest - - php: 7.1 + - php: 7.3 env: - DEPS=latest - - CS_CHECK=true - - TEST_COVERAGE=true - - php: 7.2 + - php: 7.4 env: - DEPS=lowest - - php: 7.2 + - php: 7.4 env: - DEPS=latest - - php: 7.3 + - php: nightly env: - DEPS=lowest - - php: 7.3 + - COMPOSER_ARGS="--no-interaction --ignore-platform-reqs" + - php: nightly env: - DEPS=latest + - COMPOSER_ARGS="--no-interaction --ignore-platform-reqs" before_install: - if [[ $TEST_COVERAGE != 'true' ]]; then phpenv config-rm xdebug.ini || return 0 ; fi diff --git a/composer.json b/composer.json index 30169547..10dee6f8 100644 --- a/composer.json +++ b/composer.json @@ -21,12 +21,16 @@ "extra": { }, "require": { - "php": "^5.6 || ^7.0", + "php": "^7.3 || ~8.0.0", "laminas/laminas-zendframework-bridge": "^1.0" }, + "suggest": { + "ext-iconv": "*", + "ext-mbstring": "*" + }, "require-dev": { "laminas/laminas-coding-standard": "~1.0.0", - "phpunit/phpunit": "^5.7.27 || ^6.5.8 || ^7.1.2" + "phpunit/phpunit": "^9.3" }, "autoload": { "psr-4": { diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 8a578f4b..2553b969 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -3,15 +3,14 @@ xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd" bootstrap="vendor/autoload.php" colors="true"> + + + ./src + + ./test - - - - ./src - - diff --git a/test/EscaperTest.php b/test/EscaperTest.php index 3b043b4a..732e7efa 100644 --- a/test/EscaperTest.php +++ b/test/EscaperTest.php @@ -9,6 +9,7 @@ namespace LaminasTest\Escaper; use Laminas\Escaper\Escaper; +use Laminas\Escaper\Exception\InvalidArgumentException; use PHPUnit\Framework\TestCase; class EscaperTest extends TestCase @@ -174,25 +175,23 @@ class EscaperTest extends TestCase */ protected $escaper; - public function setUp() + protected function setUp(): void { $this->escaper = new Escaper('UTF-8'); } - /** - * @expectedException \Laminas\Escaper\Exception\InvalidArgumentException - * @expectedExceptionMessage Laminas\Escaper\Escaper constructor parameter must be a string, received integer - */ public function testSettingEncodingToNonStringShouldThrowException() { - $escaper = new Escaper(1); + $this->expectExceptionMessage( + "Laminas\Escaper\Escaper constructor parameter must be a string, received integer" + ); + $this->expectException(InvalidArgumentException::class); + new Escaper(1); } - /** - * @expectedException \Laminas\Escaper\Exception\InvalidArgumentException - */ public function testSettingEncodingToEmptyStringShouldThrowException() { + $this->expectException(InvalidArgumentException::class); new Escaper(''); } @@ -207,7 +206,7 @@ public function testSettingValidEncodingShouldNotThrowExceptions() public function testSettingEncodingToInvalidValueShouldThrowException() { - $this->expectException(\Laminas\Escaper\Exception\InvalidArgumentException::class); + $this->expectException(InvalidArgumentException::class); new Escaper('invalid-encoding'); }