diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..0925d33 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,6 @@ +/.gitattributes export-ignore +/.gitignore export-ignore +/.travis.yml export-ignore +/examples/ export-ignore +/phpunit.xml.dist export-ignore +/tests/ export-ignore diff --git a/.travis.yml b/.travis.yml index 30be35b..0a5430e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,24 +1,23 @@ language: php -php: -# - 5.3 # requires old distro, see below - - 5.4 - - 5.5 - - 5.6 - - 7.0 - - 7.1 - - 7.2 - - hhvm # ignore errors, see below - -# lock distro so future defaults will not break the build +# lock distro so new future defaults will not break the build dist: trusty matrix: include: - php: 5.3 dist: precise + - php: 5.4 + - php: 5.5 + - php: 5.6 + - php: 7.0 + - php: 7.1 + - php: 7.2 + - php: 7.3 + - php: 7.4 + - php: hhvm-3.18 allow_failures: - - php: hhvm + - php: hhvm-3.18 sudo: false diff --git a/composer.json b/composer.json index c60ea02..b190291 100644 --- a/composer.json +++ b/composer.json @@ -13,6 +13,9 @@ "autoload": { "psr-4": { "Clue\\React\\Multicast\\": "src/" } }, + "autoload-dev": { + "psr-4": { "Clue\\Tests\\React\\Multicast\\": "tests/" } + }, "require": { "php": ">=5.3", "react/event-loop": "^1.0 || ^0.5 || ^0.4 || ^0.3", @@ -20,7 +23,7 @@ }, "require-dev": { "clue/hexdump": "0.2.*", - "phpunit/phpunit": "^6.0 || ^5.7 || ^4.8.35" + "phpunit/phpunit": "^9.0 ||^6.0 || ^5.7 || ^4.8.35" }, "suggest": { "ext-sockets": "Requires PHP 5.4+ and the low level socket API for listening on multicast addresses (socket options to send IGMP announcements)" diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 2c9e43f..f80bbaa 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,11 +1,6 @@ - + ./tests/ diff --git a/tests/FunctionalTest.php b/tests/FunctionalTest.php index a809509..6229505 100644 --- a/tests/FunctionalTest.php +++ b/tests/FunctionalTest.php @@ -1,5 +1,7 @@ loop = React\EventLoop\Factory::create(); + $this->loop = \React\EventLoop\Factory::create(); $this->factory = new Factory($this->loop); } @@ -31,7 +36,7 @@ public function testMultipleReceivers() { try { $receiver1 = $this->factory->createReceiver($this->address); - } catch (BadMethodCallException $e) { + } catch (\BadMethodCallException $e) { $this->markTestSkipped('No multicast support'); } diff --git a/tests/bootstrap.php b/tests/TestCase.php similarity index 87% rename from tests/bootstrap.php rename to tests/TestCase.php index b27aa01..171dd2a 100644 --- a/tests/bootstrap.php +++ b/tests/TestCase.php @@ -1,10 +1,8 @@