From 96ada04a196d924119ba80989190a475e3e40f00 Mon Sep 17 00:00:00 2001 From: Simon Frings Date: Thu, 4 Jun 2020 14:02:23 +0200 Subject: [PATCH 1/3] Add .gitattributes to exclude dev files from exports --- .gitattributes | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .gitattributes 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 From ebb6baafd5ac7b790036fe066fec245741277807 Mon Sep 17 00:00:00 2001 From: Simon Frings Date: Thu, 4 Jun 2020 14:07:25 +0200 Subject: [PATCH 2/3] Run tests on PHP 7.4 and simplify test matrix --- .travis.yml | 20 ++++++++++---------- composer.json | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.travis.yml b/.travis.yml index 72ae172..430e83f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,13 +1,4 @@ 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 dist: trusty @@ -16,8 +7,17 @@ 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 ede20d6..a38af56 100644 --- a/composer.json +++ b/composer.json @@ -20,6 +20,6 @@ "react/promise": "^2.0 || ^1.0" }, "require-dev": { - "phpunit/phpunit": "^6.0 || ^5.7 || ^4.8.35" + "phpunit/phpunit": "^7.0 ||^6.0 || ^5.7 || ^4.8.35" } } From f2db88d4533e71295798ec7180af76937acb78c3 Mon Sep 17 00:00:00 2001 From: Simon Frings Date: Thu, 4 Jun 2020 14:53:39 +0200 Subject: [PATCH 3/3] Clean up test suite --- composer.json | 3 +++ phpunit.xml.dist | 7 +------ tests/ClientTest.php | 4 +++- tests/{bootstrap.php => TestCase.php} | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) rename tests/{bootstrap.php => TestCase.php} (85%) diff --git a/composer.json b/composer.json index a38af56..a7bf49b 100644 --- a/composer.json +++ b/composer.json @@ -13,6 +13,9 @@ "autoload": { "psr-4": { "Clue\\React\\Ssdp\\": "src/" } }, + "autoload-dev": { + "psr-4": { "Clue\\Tests\\React\\Ssdp\\": "tests/" } + }, "require": { "php": ">=5.3", "clue/multicast-react": "^1.0 || ^0.2", diff --git a/phpunit.xml.dist b/phpunit.xml.dist index f497a5b..15d4daf 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,11 +1,6 @@ - + ./tests/ diff --git a/tests/ClientTest.php b/tests/ClientTest.php index cfca429..e008095 100644 --- a/tests/ClientTest.php +++ b/tests/ClientTest.php @@ -1,5 +1,7 @@ assertInstanceOf('React\Promise\PromiseInterface', $promise); - if (!($promise instanceof React\Promise\CancellablePromiseInterface)) { + if (!($promise instanceof \React\Promise\CancellablePromiseInterface)) { $this->markTestSkipped(); } diff --git a/tests/bootstrap.php b/tests/TestCase.php similarity index 85% rename from tests/bootstrap.php rename to tests/TestCase.php index 156599d..ba5e48f 100644 --- a/tests/bootstrap.php +++ b/tests/TestCase.php @@ -1,8 +1,8 @@