Skip to content

Commit 1f88e2a

Browse files
committed
Updating PHPUnit
1 parent b04fa5f commit 1f88e2a

File tree

4 files changed

+13
-10
lines changed

4 files changed

+13
-10
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"ext-curl": "*"
88
},
99
"require-dev": {
10-
"phpunit/phpunit": "4.0.*",
10+
"phpunit/phpunit": "7.0.*",
1111
"vlucas/phpdotenv": "^2.0"
1212
},
1313
"autoload": {

tests/BatchTest.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
<?php
22

33
use \DrewM\MailChimp\MailChimp;
4+
use PHPUnit\Framework\TestCase;
45

5-
class BatchTest extends PHPUnit_Framework_TestCase
6+
class BatchTest extends TestCase
67
{
78

89
public function setUp()
@@ -24,7 +25,7 @@ public function testNewBatch()
2425
}
2526

2627
$MailChimp = new MailChimp($MC_API_KEY);
27-
$Batch = $MailChimp->new_batch();
28+
$Batch = $MailChimp->new_batch();
2829

2930
$this->assertInstanceOf('DrewM\MailChimp\Batch', $Batch);
3031
}

tests/ListsTest.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
<?php
22

33
use \DrewM\MailChimp\MailChimp;
4+
use PHPUnit\Framework\TestCase;
45

5-
class ListsTest extends PHPUnit_Framework_TestCase
6+
class ListsTest extends TestCase
67
{
78

89
public function setUp()
@@ -24,7 +25,7 @@ public function testGetLists()
2425
}
2526

2627
$MailChimp = new MailChimp($MC_API_KEY);
27-
$lists = $MailChimp->get('lists');
28+
$lists = $MailChimp->get('lists');
2829

2930
$this->assertArrayHasKey('lists', $lists);
3031
}

tests/MailChimpTest.php

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
<?php
22

33
use \DrewM\MailChimp\MailChimp;
4+
use PHPUnit\Framework\TestCase;
45

5-
class MailChimpTest extends PHPUnit_Framework_TestCase
6+
class MailChimpTest extends TestCase
67
{
78

89
public function setUp()
@@ -18,14 +19,14 @@ public function setUp()
1819

1920
public function testInvalidAPIKey()
2021
{
21-
$this->setExpectedException('\Exception');
22+
$this->expectException('\Exception');
2223
$MailChimp = new MailChimp('abc');
2324
}
2425

2526
public function testTestEnvironment()
2627
{
2728
$MC_API_KEY = getenv('MC_API_KEY');
28-
$message = 'No environment variables! Copy .env.example -> .env and fill out your MailChimp account details.';
29+
$message = 'No environment variables! Copy .env.example -> .env and fill out your MailChimp account details.';
2930
$this->assertNotEmpty($MC_API_KEY, $message);
3031
}
3132

@@ -51,9 +52,9 @@ public function testSubscriberHash()
5152

5253
$MailChimp = new MailChimp($MC_API_KEY);
5354

54-
$email = '[email protected]';
55+
$email = '[email protected]';
5556
$expected = md5(strtolower($email));
56-
$result = $MailChimp->subscriberHash($email);
57+
$result = $MailChimp->subscriberHash($email);
5758

5859
$this->assertEquals($expected, $result);
5960
}

0 commit comments

Comments
 (0)