Skip to content

Commit f40a1f6

Browse files
authored
Add PHP 7.2 to Travis (#134)
* Upgrade PHPUnit * Add PHP7.2 to Travis
1 parent 6e1b88c commit f40a1f6

File tree

6 files changed

+10
-7
lines changed

6 files changed

+10
-7
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ cache:
1010
php:
1111
- 7.0
1212
- 7.1
13+
- 7.2
1314

1415
env:
1516
- TRAVIS_NODE_VERSION="stable"

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"guzzlehttp/guzzle": "^6.2"
2323
},
2424
"require-dev": {
25-
"phpunit/phpunit": "5.7.*"
25+
"phpunit/phpunit": "^6.5.0"
2626
},
2727
"autoload": {
2828
"psr-4" : {

tests/EncryptionTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
use Minishlink\WebPush\Encryption;
1313
use Minishlink\WebPush\Utils;
1414

15-
class EncryptionTest extends PHPUnit_Framework_TestCase
15+
class EncryptionTest extends PHPUnit\Framework\TestCase
1616
{
1717
/**
1818
* @dataProvider payloadProvider

tests/PushServiceTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
use Minishlink\WebPush\WebPush;
1313

14-
class PushServiceTest extends PHPUnit_Framework_TestCase
14+
class PushServiceTest extends PHPUnit\Framework\TestCase
1515
{
1616
private static $timeout = 30;
1717
private static $portNumber = 9012;

tests/VAPIDTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
use Minishlink\WebPush\Utils;
1313
use Minishlink\WebPush\VAPID;
1414

15-
class VAPIDTest extends PHPUnit_Framework_TestCase
15+
class VAPIDTest extends PHPUnit\Framework\TestCase
1616
{
1717
public function vapidProvider()
1818
{

tests/WebPushTest.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
use Minishlink\WebPush\WebPush;
1313

14-
class WebPushTest extends PHPUnit_Framework_TestCase
14+
class WebPushTest extends PHPUnit\Framework\TestCase
1515
{
1616
private static $endpoints;
1717
private static $keys;
@@ -137,7 +137,8 @@ public function testSendNotificationBatch()
137137

138138
public function testSendNotificationWithTooBigPayload()
139139
{
140-
$this->setExpectedException('ErrorException', 'Size of payload must not be greater than 4078 octets.');
140+
$this->expectException('ErrorException');
141+
$this->expectExceptionMessage('Size of payload must not be greater than 4078 octets.');
141142
$this->webPush->sendNotification(
142143
self::$endpoints['standard'],
143144
str_repeat('test', 1020),
@@ -166,7 +167,8 @@ public function testSendGCMNotificationWithoutGCMApiKey()
166167
}
167168

168169
$webPush = new WebPush();
169-
$this->setExpectedException('ErrorException', 'No GCM API Key specified.');
170+
$this->expectException('ErrorException');
171+
$this->expectExceptionMessage('No GCM API Key specified.');
170172
$webPush->sendNotification(self::$endpoints['GCM'], null, null, null, true);
171173
}
172174

0 commit comments

Comments
 (0)