Skip to content

Commit acae0c5

Browse files
committed
Update to more modern phpunit syntax
1 parent 512d1b0 commit acae0c5

13 files changed

+17
-15
lines changed

tests/Zendesk/API/LiveTests/BasicTest.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77
/**
88
* Basic test class
99
*/
10-
abstract class BasicTest extends \PHPUnit_Framework_TestCase
10+
use PHPUnit\Framework\TestCase;
11+
12+
abstract class BasicTest extends TestCase
1113
{
1214
/**
1315
* @var HttpClient
@@ -68,7 +70,7 @@ public function __construct($name = null, array $data = [], $dataName = '')
6870
* Sets up the fixture, for example, open a network connection.
6971
* This method is called before a test is executed.
7072
*/
71-
protected function setUp()
73+
protected function setUp(): void
7274
{
7375
$this->client = new HttpClient($this->subdomain, $this->username, $this->scheme, $this->hostname, $this->port);
7476

tests/Zendesk/API/UnitTests/BasicTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
/**
1616
* Basic test class
1717
*/
18-
abstract class BasicTest extends \PHPUnit_Framework_TestCase
18+
abstract class BasicTest extends \PHPUnit\Framework\TestCase
1919
{
2020
/**
2121
* @var HttpClient
@@ -74,7 +74,7 @@ public function __construct($name = null, array $data = [], $dataName = '')
7474
* Sets up the fixture, for example, open a network connection.
7575
* This method is called before a test is executed.
7676
*/
77-
protected function setUp()
77+
protected function setUp(): void
7878
{
7979
parent::setUp();
8080
$this->client = new HttpClient($this->subdomain, $this->username, $this->scheme, $this->hostname, $this->port);

tests/Zendesk/API/UnitTests/Core/AppInstallationsTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class AppInstallationsTest extends BasicTest
1515
protected $testResource1;
1616
protected $testResource2;
1717

18-
public function setUp()
18+
public function setUp(): void
1919
{
2020
$this->testResource0 = ['anyField' => 'Any field 0'];
2121
$this->testResource1 = ['anyField' => 'Any field 1'];

tests/Zendesk/API/UnitTests/Core/AutomationsTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class AutomationsTest extends BasicTest
1414
protected $testResource1;
1515
protected $testResource2;
1616

17-
public function setUp()
17+
public function setUp(): void
1818
{
1919
$this->testResource0 = ['anyField' => 'Any field 0'];
2020
$this->testResource1 = ['anyField' => 'Any field 1'];

tests/Zendesk/API/UnitTests/Core/CustomRolesTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class CustomRolesTest extends BasicTest
1111
protected $testResource1;
1212
protected $testResource2;
1313

14-
public function setUp()
14+
public function setUp(): void
1515
{
1616
$this->testResource0 = ['anyField' => 'Any field 0'];
1717
$this->testResource1 = ['anyField' => 'Any field 1'];

tests/Zendesk/API/UnitTests/Core/MacrosTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class MacrosTest extends BasicTest
1515
protected $testResource1;
1616
protected $testResource2;
1717

18-
public function setUp()
18+
public function setUp(): void
1919
{
2020
$this->testResource0 = ['anyField' => 'Any field 0'];
2121
$this->testResource1 = ['anyField' => 'Any field 1'];

tests/Zendesk/API/UnitTests/Core/OrganizationMembershipsTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class OrganizationMembershipsTest extends BasicTest
1414
protected $testResource1;
1515
protected $testResource2;
1616

17-
public function setUp()
17+
public function setUp(): void
1818
{
1919
$this->testResource0 = ['anyField' => 'Any field 0'];
2020
$this->testResource1 = ['anyField' => 'Any field 1'];

tests/Zendesk/API/UnitTests/Core/OrganizationsTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class OrganizationsTest extends BasicTest
1414
protected $testResource1;
1515
protected $testResource2;
1616

17-
public function setUp()
17+
public function setUp(): void
1818
{
1919
$this->testResource0 = ['anyField' => 'Any field 0'];
2020
$this->testResource1 = ['anyField' => 'Any field 1'];

tests/Zendesk/API/UnitTests/Core/RequestsTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class RequestsTest extends BasicTest
1414
protected $testResource1;
1515
protected $testResource2;
1616

17-
public function setUp()
17+
public function setUp(): void
1818
{
1919
$this->testResource0 = ['anyField' => 'Any field 0'];
2020
$this->testResource1 = ['anyField' => 'Any field 1'];

tests/Zendesk/API/UnitTests/Core/ResourceTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class ResourceTest extends BasicTest
1717
/**
1818
* {@inheritdoc}
1919
*/
20-
public function setUp()
20+
public function setUp(): void
2121
{
2222
parent::setUp();
2323
$this->dummyResource = new DummyResource($this->client);

0 commit comments

Comments
 (0)