Skip to content

Commit

Permalink
Replace deprecated phpunit calls with latest
Browse files Browse the repository at this point in the history
  • Loading branch information
sqmk committed Dec 1, 2017
1 parent 99cdda5 commit 1fef2ac
Show file tree
Hide file tree
Showing 45 changed files with 102 additions and 119 deletions.
2 changes: 1 addition & 1 deletion tests/Phue/Test/BridgeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class BridgeTest extends \PHPUnit_Framework_TestCase
public function setUp()
{
// Mock client
$this->mockClient = $this->getMock('\Phue\Client',
$this->mockClient = $this->createMock('\Phue\Client',
array(
'sendCommand'
), array(
Expand Down
22 changes: 11 additions & 11 deletions tests/Phue/Test/ClientTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public function testGetSetUsername()
public function testGetBridge()
{
// Mock transport
$mockTransport = $this->getMock('\Phue\Transport\TransportInterface',
$mockTransport = $this->createMock('\Phue\Transport\TransportInterface',
array(
'sendRequest'
));
Expand All @@ -87,7 +87,7 @@ public function testGetBridge()
public function testGetUsers()
{
// Mock transport
$mockTransport = $this->getMock('\Phue\Transport\TransportInterface',
$mockTransport = $this->createMock('\Phue\Transport\TransportInterface',
array(
'sendRequest'
));
Expand Down Expand Up @@ -127,7 +127,7 @@ public function testGetUsers()
public function testGetLights()
{
// Mock transport
$mockTransport = $this->getMock('\Phue\Transport\TransportInterface',
$mockTransport = $this->createMock('\Phue\Transport\TransportInterface',
array(
'sendRequest'
));
Expand Down Expand Up @@ -168,7 +168,7 @@ public function testGetLights()
public function testGetGroups()
{
// Mock transport
$mockTransport = $this->getMock('\Phue\Transport\TransportInterface',
$mockTransport = $this->createMock('\Phue\Transport\TransportInterface',
array(
'sendRequest'
));
Expand Down Expand Up @@ -209,7 +209,7 @@ public function testGetGroups()
public function testGetSchedules()
{
// Mock transport
$mockTransport = $this->getMock('\Phue\Transport\TransportInterface',
$mockTransport = $this->createMock('\Phue\Transport\TransportInterface',
array(
'sendRequest'
));
Expand Down Expand Up @@ -247,7 +247,7 @@ public function testGetSchedules()
public function testGetScenes()
{
// Mock transport
$mockTransport = $this->getMock('\Phue\Transport\TransportInterface',
$mockTransport = $this->createMock('\Phue\Transport\TransportInterface',
array(
'sendRequest'
));
Expand Down Expand Up @@ -290,7 +290,7 @@ public function testGetScenes()
public function testGetSensors()
{
// Mock transport
$mockTransport = $this->getMock('\Phue\Transport\TransportInterface',
$mockTransport = $this->createMock('\Phue\Transport\TransportInterface',
array(
'sendRequest'
));
Expand Down Expand Up @@ -327,7 +327,7 @@ public function testGetSensors()
public function testGetRules()
{
// Mock transport
$mockTransport = $this->getMock('\Phue\Transport\TransportInterface',
$mockTransport = $this->createMock('\Phue\Transport\TransportInterface',
array(
'sendRequest'
));
Expand Down Expand Up @@ -364,7 +364,7 @@ public function testGetRules()
public function testGetTimezones()
{
// Mock transport
$mockTransport = $this->getMock('\Phue\Transport\TransportInterface',
$mockTransport = $this->createMock('\Phue\Transport\TransportInterface',
array(
'sendRequest',
'sendRequestBypassBodyValidation'
Expand Down Expand Up @@ -409,7 +409,7 @@ public function testInstantiateDefaultTransport()
public function testPassingTransportDependency()
{
// Mock transport
$mockTransport = $this->getMock('\Phue\Transport\TransportInterface');
$mockTransport = $this->createMock('\Phue\Transport\TransportInterface');

$this->client->setTransport($mockTransport);

Expand All @@ -424,7 +424,7 @@ public function testPassingTransportDependency()
public function testSendCommand()
{
// Mock command
$mockCommand = $this->getMock('Phue\Command\CommandInterface',
$mockCommand = $this->createMock('Phue\Command\CommandInterface',
array(
'send'
));
Expand Down
4 changes: 2 additions & 2 deletions tests/Phue/Test/Command/CreateGroupTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class CreateGroupTest extends \PHPUnit_Framework_TestCase
public function setUp()
{
// Mock client
$this->mockClient = $this->getMock('\Phue\Client',
$this->mockClient = $this->createMock('\Phue\Client',
array(
'getUsername',
'getTransport'
Expand All @@ -33,7 +33,7 @@ public function setUp()
));

// Mock transport
$this->mockTransport = $this->getMock('\Phue\Transport\TransportInterface',
$this->mockTransport = $this->createMock('\Phue\Transport\TransportInterface',
array(
'sendRequest'
));
Expand Down
4 changes: 2 additions & 2 deletions tests/Phue/Test/Command/CreateSceneTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class CreateSceneTest extends \PHPUnit_Framework_TestCase
public function setUp()
{
// Mock client
$this->mockClient = $this->getMock('\Phue\Client',
$this->mockClient = $this->createMock('\Phue\Client',
array(
'getUsername',
'getTransport'
Expand All @@ -33,7 +33,7 @@ public function setUp()
));

// Mock transport
$this->mockTransport = $this->getMock('\Phue\Transport\TransportInterface',
$this->mockTransport = $this->createMock('\Phue\Transport\TransportInterface',
array(
'sendRequest'
));
Expand Down
6 changes: 3 additions & 3 deletions tests/Phue/Test/Command/CreateScheduleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public function setUp()
date_default_timezone_set('UTC');

// Mock client
$this->mockClient = $this->getMock('\Phue\Client',
$this->mockClient = $this->createMock('\Phue\Client',
array(
'getUsername',
'getTransport'
Expand All @@ -37,7 +37,7 @@ public function setUp()
));

// Mock transport
$this->mockTransport = $this->getMock('\Phue\Transport\TransportInterface',
$this->mockTransport = $this->createMock('\Phue\Transport\TransportInterface',
array(
'sendRequest'
));
Expand All @@ -53,7 +53,7 @@ public function setUp()
->will($this->returnValue($this->mockTransport));

// Mock actionable command
$this->mockCommand = $this->getMock('\Phue\Command\ActionableInterface',
$this->mockCommand = $this->createMock('\Phue\Command\ActionableInterface',
array(
'getActionableParams'
));
Expand Down
4 changes: 2 additions & 2 deletions tests/Phue/Test/Command/CreateUserTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class CreateUserTest extends \PHPUnit_Framework_TestCase
public function setUp()
{
// Mock client
$this->mockClient = $this->getMock('\Phue\Client',
$this->mockClient = $this->createMock('\Phue\Client',
array(
'getUsername',
'getTransport'
Expand All @@ -33,7 +33,7 @@ public function setUp()
));

// Mock transport
$this->mockTransport = $this->getMock('\Phue\Transport\TransportInterface',
$this->mockTransport = $this->createMock('\Phue\Transport\TransportInterface',
array(
'sendRequest'
));
Expand Down
4 changes: 2 additions & 2 deletions tests/Phue/Test/Command/DeleteGroupTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class DeleteGroupTest extends \PHPUnit_Framework_TestCase
public function setUp()
{
// Mock client
$this->mockClient = $this->getMock('\Phue\Client',
$this->mockClient = $this->createMock('\Phue\Client',
array(
'getUsername',
'getTransport'
Expand All @@ -33,7 +33,7 @@ public function setUp()
));

// Mock transport
$this->mockTransport = $this->getMock('\Phue\Transport\TransportInterface',
$this->mockTransport = $this->createMock('\Phue\Transport\TransportInterface',
array(
'sendRequest'
));
Expand Down
4 changes: 2 additions & 2 deletions tests/Phue/Test/Command/DeleteRuleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class DeleteRuleTest extends \PHPUnit_Framework_TestCase
public function setUp()
{
// Mock client
$this->mockClient = $this->getMock('\Phue\Client',
$this->mockClient = $this->createMock('\Phue\Client',
array(
'getUsername',
'getTransport'
Expand All @@ -33,7 +33,7 @@ public function setUp()
));

// Mock transport
$this->mockTransport = $this->getMock('\Phue\Transport\TransportInterface',
$this->mockTransport = $this->createMock('\Phue\Transport\TransportInterface',
array(
'sendRequest'
));
Expand Down
4 changes: 2 additions & 2 deletions tests/Phue/Test/Command/DeleteScheduleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class DeleteScheduleTest extends \PHPUnit_Framework_TestCase
public function setUp()
{
// Mock client
$this->mockClient = $this->getMock('\Phue\Client',
$this->mockClient = $this->createMock('\Phue\Client',
array(
'getUsername',
'getTransport'
Expand All @@ -33,7 +33,7 @@ public function setUp()
));

// Mock transport
$this->mockTransport = $this->getMock('\Phue\Transport\TransportInterface',
$this->mockTransport = $this->createMock('\Phue\Transport\TransportInterface',
array(
'sendRequest'
));
Expand Down
4 changes: 2 additions & 2 deletions tests/Phue/Test/Command/DeleteUserTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class DeleteUserTest extends \PHPUnit_Framework_TestCase
public function setUp()
{
// Mock client
$this->mockClient = $this->getMock('\Phue\Client',
$this->mockClient = $this->createMock('\Phue\Client',
array(
'getUsername',
'getTransport'
Expand All @@ -33,7 +33,7 @@ public function setUp()
));

// Mock transport
$this->mockTransport = $this->getMock('\Phue\Transport\TransportInterface',
$this->mockTransport = $this->createMock('\Phue\Transport\TransportInterface',
array(
'sendRequest'
));
Expand Down
4 changes: 2 additions & 2 deletions tests/Phue/Test/Command/GetBridgeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public function setUp()
$this->getBridge = new GetBridge();

// Mock client
$this->mockClient = $this->getMock('\Phue\Client',
$this->mockClient = $this->createMock('\Phue\Client',
array(
'getUsername',
'getTransport'
Expand All @@ -35,7 +35,7 @@ public function setUp()
));

// Mock transport
$this->mockTransport = $this->getMock('\Phue\Transport\TransportInterface',
$this->mockTransport = $this->createMock('\Phue\Transport\TransportInterface',
array(
'sendRequest'
));
Expand Down
4 changes: 2 additions & 2 deletions tests/Phue/Test/Command/GetGroupByIdTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class GetGroupByIdTest extends \PHPUnit_Framework_TestCase
public function setUp()
{
// Mock client
$this->mockClient = $this->getMock('\Phue\Client',
$this->mockClient = $this->createMock('\Phue\Client',
array(
'getUsername',
'getTransport'
Expand All @@ -33,7 +33,7 @@ public function setUp()
));

// Mock transport
$this->mockTransport = $this->getMock('\Phue\Transport\TransportInterface',
$this->mockTransport = $this->createMock('\Phue\Transport\TransportInterface',
array(
'sendRequest'
));
Expand Down
4 changes: 2 additions & 2 deletions tests/Phue/Test/Command/GetGroupsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public function setUp()
$this->getGroups = new GetGroups();

// Mock client
$this->mockClient = $this->getMock('\Phue\Client',
$this->mockClient = $this->createMock('\Phue\Client',
array(
'getUsername',
'getTransport'
Expand All @@ -35,7 +35,7 @@ public function setUp()
));

// Mock transport
$this->mockTransport = $this->getMock('\Phue\Transport\TransportInterface',
$this->mockTransport = $this->createMock('\Phue\Transport\TransportInterface',
array(
'sendRequest'
));
Expand Down
4 changes: 2 additions & 2 deletions tests/Phue/Test/Command/GetLightByIdTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class GetLightByIdTest extends \PHPUnit_Framework_TestCase
public function setUp()
{
// Mock client
$this->mockClient = $this->getMock('\Phue\Client',
$this->mockClient = $this->createMock('\Phue\Client',
array(
'getUsername',
'getTransport'
Expand All @@ -33,7 +33,7 @@ public function setUp()
));

// Mock transport
$this->mockTransport = $this->getMock('\Phue\Transport\TransportInterface',
$this->mockTransport = $this->createMock('\Phue\Transport\TransportInterface',
array(
'sendRequest'
));
Expand Down
4 changes: 2 additions & 2 deletions tests/Phue/Test/Command/GetLightsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public function setUp()
$this->getLights = new GetLights();

// Mock client
$this->mockClient = $this->getMock('\Phue\Client',
$this->mockClient = $this->createMock('\Phue\Client',
array(
'getUsername',
'getTransport'
Expand All @@ -35,7 +35,7 @@ public function setUp()
));

// Mock transport
$this->mockTransport = $this->getMock('\Phue\Transport\TransportInterface',
$this->mockTransport = $this->createMock('\Phue\Transport\TransportInterface',
array(
'sendRequest'
));
Expand Down
4 changes: 2 additions & 2 deletions tests/Phue/Test/Command/GetNewLightsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public function setUp()
$this->getNewLights = new GetNewLights();

// Mock client
$this->mockClient = $this->getMock('\Phue\Client',
$this->mockClient = $this->createMock('\Phue\Client',
array(
'getUsername',
'getTransport'
Expand All @@ -35,7 +35,7 @@ public function setUp()
));

// Mock transport
$this->mockTransport = $this->getMock('\Phue\Transport\TransportInterface',
$this->mockTransport = $this->createMock('\Phue\Transport\TransportInterface',
array(
'sendRequest'
));
Expand Down
4 changes: 2 additions & 2 deletions tests/Phue/Test/Command/GetNewSensorsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public function setUp()
$this->getNewSensors = new GetNewSensors();

// Mock client
$this->mockClient = $this->getMock('\Phue\Client',
$this->mockClient = $this->createMock('\Phue\Client',
array(
'getUsername',
'getTransport'
Expand All @@ -35,7 +35,7 @@ public function setUp()
));

// Mock transport
$this->mockTransport = $this->getMock('\Phue\Transport\TransportInterface',
$this->mockTransport = $this->createMock('\Phue\Transport\TransportInterface',
array(
'sendRequest'
));
Expand Down
Loading

0 comments on commit 1fef2ac

Please sign in to comment.