Skip to content

Commit

Permalink
Support PHPUnit 6
Browse files Browse the repository at this point in the history
  • Loading branch information
carusogabriel committed Nov 13, 2017
1 parent 9f3f4ea commit d88c62a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@
},
"require-dev": {
"clue/block-react": "~0.3.0",
"phpunit/phpunit": "^5.0 || ^4.8"
"phpunit/phpunit": "^6.4 || ^5.7 || ^4.8.35"
}
}
11 changes: 8 additions & 3 deletions tests/FunctionalTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@
use Clue\React\Soap\Client;
use Clue\React\Soap\Proxy;
use Clue\React\Block;
use PHPUnit\Framework\TestCase;

class FunctionalTest extends PHPUnit_Framework_TestCase
class FunctionalTest extends TestCase
{
/**
* @var React\EventLoop\LoopInterface
Expand Down Expand Up @@ -42,23 +43,27 @@ public function testBlzService()
$this->assertInternalType('object', $result);
}

/**
* @expectedException Exception
*/
public function testBlzServiceWithInvalidBlz()
{
$api = new Proxy($this->client);

$promise = $api->getBank(array('blz' => 'invalid'));

$this->setExpectedException('Exception');
Block\await($promise, $this->loop);
}

/**
* @expectedException Exception
*/
public function testBlzServiceWithInvalidMethod()
{
$api = new Proxy($this->client);

$promise = $api->doesNotexist();

$this->setExpectedException('Exception');
Block\await($promise, $this->loop);
}

Expand Down

0 comments on commit d88c62a

Please sign in to comment.