Skip to content

Commit

Permalink
Migrate to php 7
Browse files Browse the repository at this point in the history
  • Loading branch information
svilborg committed Jan 5, 2019
1 parent 80535bd commit 0ce9b57
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 17 deletions.
7 changes: 3 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,13 @@
"issues": "https://github.com/svilborg/php-roku?state=open",
"source": "https://github.com/svilborg/php-roku"
},
"minimum-stability": "dev",
"require":{
"php":">=5.3.2",
"php":">=7.0.0",
"nategood/httpful": "*"
},
"require-dev":{
"phpunit/phpunit":"3.7.*@dev",
"satooshi/php-coveralls": "dev-master"
"phpunit/phpunit": "^4.8.35 || ^5.4.3 || ^6.0",
"satooshi/php-coveralls": "2.*"
},
"autoload":{
"psr-0":{
Expand Down
3 changes: 2 additions & 1 deletion tests/Roku/Commands/CommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
namespace Tests\Roku;

use \Roku\Commands\Command;
use PHPUnit\Framework\TestCase;

class CommandTest extends \PHPUnit_Framework_TestCase
class CommandTest extends TestCase
{

public function setUp()
Expand Down
3 changes: 2 additions & 1 deletion tests/Roku/Commands/SensorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
namespace Tests\Roku;

use \Roku\Commands\Sensor;
use PHPUnit\Framework\TestCase;

class SensorTest extends \PHPUnit_Framework_TestCase
class SensorTest extends TestCase
{

public function setUp()
Expand Down
23 changes: 12 additions & 11 deletions tests/Roku/RokuTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@

use Roku;
use \Httpful\Request;
use PHPUnit\Framework\TestCase;

class RokuTest extends \PHPUnit_Framework_TestCase
class RokuTest extends TestCase
{

public function setUp() {
Expand Down Expand Up @@ -69,21 +70,21 @@ public function testApplication()
$this->assertEquals(new \Roku\Application("dev", "0.1.0", "Test App"), $app);
}

/**
* @expectedException \Roku\Exception
* @expectedExceptionCode 0
*/
public function testErrors()
{
$this->setExpectedException(
'\Roku\Exception'
);

$this->assertNotNull($this->roku->rotate());
}

/**
* @expectedException \Roku\Exception
* @expectedExceptionCode 0
*/
public function testErrorsTouch()
{
$this->setExpectedException(
'\Roku\Exception'
);

$this->assertNotNull($this->roku->touch(1,1,"nosuchtouch"));
}

Expand Down Expand Up @@ -134,7 +135,7 @@ public function getHttpInstance () {

$response = new \Httpful\Response("", $headers, \Httpful\Request::init());

$http = $this->getMock('\Roku\Utils\Http');
$http = $this->createMock('\Roku\Utils\Http');

// Configure the stub.
$http->expects($this->any())
Expand All @@ -156,7 +157,7 @@ public function getHttpXmlInstance ($file = "apps.xml") {

$response = new \Httpful\Response( file_get_contents(__DIR__."/../data/" . $file), $headers, \Httpful\Request::init());

$http = $this->getMock('\Roku\Utils\Http');
$http = $this->createMock('\Roku\Utils\Http');

// Configure the stub.
$http->expects($this->any())
Expand Down

0 comments on commit 0ce9b57

Please sign in to comment.