diff --git a/.travis.yml b/.travis.yml index 429cdca..5d87a4c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,37 +13,37 @@ env: matrix: fast_finish: true include: - - 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: 7.4 env: - DEPS=lowest - - php: 7.3 + - COMPOSER_VERSION=2 + - php: 7.4 env: - DEPS=latest - - php: 7.4 + - COMPOSER_VERSION=2 + - php: nightly env: - DEPS=lowest - - php: 7.4 + - php: nightly env: - DEPS=latest - - php: 7.4 + - php: nightly env: - DEPS=lowest - COMPOSER_VERSION=2 - - php: 7.4 + - php: nightly env: - DEPS=latest - COMPOSER_VERSION=2 diff --git a/composer.json b/composer.json index 69c8e3b..9d98440 100644 --- a/composer.json +++ b/composer.json @@ -25,7 +25,7 @@ "class": "Laminas\\ComponentInstaller\\ComponentInstaller" }, "require": { - "php": "^7.1", + "php": "^7.3 || ~8.0.0", "composer-plugin-api": "^1.0 || ^2.0", "laminas/laminas-zendframework-bridge": "^1.0" }, @@ -34,7 +34,8 @@ "laminas/laminas-coding-standard": "~1.0.0", "malukenho/docheader": "^0.1.6", "mikey179/vfsstream": "^1.6.7", - "phpunit/phpunit": "^7.5.15 || ^8.3.4" + "phpspec/prophecy-phpunit": "^2.0", + "phpunit/phpunit": "^9.3" }, "autoload": { "psr-4": { diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 7d8a4dd..fca4ccb 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -9,9 +9,9 @@ - - + + src - - + + diff --git a/test/ComponentInstallerTest.php b/test/ComponentInstallerTest.php index df23695..a03e22a 100644 --- a/test/ComponentInstallerTest.php +++ b/test/ComponentInstallerTest.php @@ -26,6 +26,7 @@ use org\bovigo\vfs\vfsStreamDirectory; use PHPUnit\Framework\TestCase; use Prophecy\Argument; +use Prophecy\PhpUnit\ProphecyTrait; use Prophecy\Prophecy\ObjectProphecy; use ReflectionObject; @@ -40,6 +41,8 @@ class ComponentInstallerTest extends TestCase { + use ProphecyTrait; + /** * @var vfsStreamDirectory */ @@ -1258,7 +1261,7 @@ public function testOnPostPackageUninstallRemovesPackageFromConfiguration() $this->assertNull($this->installer->onPostPackageUninstall($event->reveal())); $config = file_get_contents(vfsStream::url('project/config/application.config.php')); - $this->assertNotContains('Some\Component', $config); + $this->assertStringNotContainsString('Some\Component', $config); } public function testOnPostPackageUninstallCanRemovePackageArraysFromConfiguration() @@ -1305,8 +1308,8 @@ public function testOnPostPackageUninstallCanRemovePackageArraysFromConfiguratio $this->assertNull($this->installer->onPostPackageUninstall($event->reveal())); $config = file_get_contents(vfsStream::url('project/config/application.config.php')); - $this->assertNotContains('Some\Component', $config); - $this->assertNotContains('Other\Component', $config); + $this->assertStringNotContainsString('Some\Component', $config); + $this->assertStringNotContainsString('Other\Component', $config); } public function testModuleIsAppended()