diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 70c62ee..799cd49 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -9,7 +9,7 @@ jobs: strategy: matrix: - php-version: [ 5.6, "7.0", 7.1, 7.2, 7.3, 7.4 ] + php-version: [ 7.2, 7.3, 7.4, "8.0", 8.1, 8.2 ] os: [ ubuntu-latest ] steps: diff --git a/.gitignore b/.gitignore index 33306ea..acecdef 100755 --- a/.gitignore +++ b/.gitignore @@ -13,4 +13,8 @@ *.xml # ignore PHPStorm files -.idea/* \ No newline at end of file +.idea/* + +# PHPUnit +/phpunit.xml +.phpunit.result.cache diff --git a/README.md b/README.md index 4f16c17..2f5db50 100755 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ easy inclusion in your projects. ## Requirements - a server with: - - PHP 5.6 or higher + - PHP 7.2 or higher - PHP json and PHP cURL modules - tested on Apache 2.4 with PHP 5.6.1 and cURL 7.42.1 and with PHP 7.4.9 and cURL 7.68.0 - direct network connectivity between this server and the host and port (usually TCP port 8443 or port 443 for diff --git a/composer.json b/composer.json index dc61f2c..cd9e516 100755 --- a/composer.json +++ b/composer.json @@ -20,7 +20,7 @@ } ], "require": { - "php": ">=5.6", + "php": ">=7.2", "ext-curl": "*", "ext-json": "*" }, @@ -30,7 +30,7 @@ } }, "require-dev": { - "phpunit/phpunit": "^5.7" + "phpunit/phpunit": "^8.5" }, "scripts": { "test" : [ diff --git a/phpunit.xml.dist b/phpunit.xml.dist index b65be17..6894478 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,6 +1,6 @@ diff --git a/tests/ClientTest.php b/tests/ClientTest.php index c90a1b0..3ba4040 100644 --- a/tests/ClientTest.php +++ b/tests/ClientTest.php @@ -9,7 +9,7 @@ class ClientTest extends TestCase { private $client; - protected function setUp() + protected function setUp(): void { $this->client = new Client('unifi', 'unifi'); } @@ -29,9 +29,8 @@ public function testSetSite() // whitespace (debug mode) $this->client->set_debug(true); - $this->expectException(\PHPUnit_Framework_Error_Notice::class); - $this->expectExceptionCode(E_USER_NOTICE); - $this->expectExceptionMessage('The provided (short) site name may not contain any spaces'); + $this->expectNotice(); + $this->expectNoticeMessage('The provided (short) site name may not contain any spaces'); $this->client->set_site(' foobar '); } }