Skip to content

Commit d54d18a

Browse files
committed
Use PHPUnit 8
1 parent 77dbb6b commit d54d18a

File tree

6 files changed

+13
-10
lines changed

6 files changed

+13
-10
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99

1010
strategy:
1111
matrix:
12-
php-version: [ 5.6, "7.0", 7.1, 7.2, 7.3, 7.4 ]
12+
php-version: [ 7.2, 7.3, 7.4, "8.0", 8.1, 8.2 ]
1313
os: [ ubuntu-latest ]
1414

1515
steps:

.gitignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,8 @@
1313
*.xml
1414

1515
# ignore PHPStorm files
16-
.idea/*
16+
.idea/*
17+
18+
# PHPUnit
19+
/phpunit.xml
20+
.phpunit.result.cache

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ easy inclusion in your projects.
1313
## Requirements
1414

1515
- a server with:
16-
- PHP 5.6 or higher
16+
- PHP 7.2 or higher
1717
- PHP json and PHP cURL modules
1818
- 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
1919
- direct network connectivity between this server and the host and port (usually TCP port 8443 or port 443 for

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
}
2121
],
2222
"require": {
23-
"php": ">=5.6",
23+
"php": ">=7.2",
2424
"ext-curl": "*",
2525
"ext-json": "*"
2626
},
@@ -30,7 +30,7 @@
3030
}
3131
},
3232
"require-dev": {
33-
"phpunit/phpunit": "^5.7"
33+
"phpunit/phpunit": "^8.5"
3434
},
3535
"scripts": {
3636
"test" : [

phpunit.xml.dist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3-
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/5.7/phpunit.xsd"
3+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/8.5/phpunit.xsd"
44
colors="true">
55
<testsuites>
66
<testsuite name="Unit tests">

tests/ClientTest.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ class ClientTest extends TestCase
99
{
1010
private $client;
1111

12-
protected function setUp()
12+
protected function setUp(): void
1313
{
1414
$this->client = new Client('unifi', 'unifi');
1515
}
@@ -29,9 +29,8 @@ public function testSetSite()
2929

3030
// whitespace (debug mode)
3131
$this->client->set_debug(true);
32-
$this->expectException(\PHPUnit_Framework_Error_Notice::class);
33-
$this->expectExceptionCode(E_USER_NOTICE);
34-
$this->expectExceptionMessage('The provided (short) site name may not contain any spaces');
32+
$this->expectNotice();
33+
$this->expectNoticeMessage('The provided (short) site name may not contain any spaces');
3534
$this->client->set_site(' foobar ');
3635
}
3736
}

0 commit comments

Comments
 (0)