Skip to content

Commit

Permalink
Update for PHPUnit 6 support
Browse files Browse the repository at this point in the history
  • Loading branch information
mbabker committed Feb 19, 2017
1 parent 206754e commit d8c299a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
15 changes: 12 additions & 3 deletions Tests/ClientTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,16 @@
use Joomla\Input\Input;
use Joomla\Test\WebInspector;
use Joomla\Test\TestHelper;
use PHPUnit\Framework\TestCase;

require_once __DIR__ . '/stubs/ClientInspector.php';


/**
* Test class for OAuth1 Client.
*
* @since 1.0
*/
class ClientTest extends \PHPUnit_Framework_TestCase
class ClientTest extends TestCase
{
/**
* @var Input input for the Client object.
Expand Down Expand Up @@ -199,7 +199,16 @@ public function testAuthenticate($token, $fail, $version)

$this->application->setSession($mockSession);

$this->setExpectedException('DomainException');
// expectException was added in PHPUnit 5.2 and setExpectedException removed in 6.0
if (method_exists($this, 'expectException'))
{
$this->expectException('DomainException');
}
else
{
$this->setExpectedException('DomainException');
}

$result = $this->object->authenticate();
}

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"require-dev": {
"joomla/test": "~1.0",
"joomla/event": "~1.0",
"phpunit/phpunit": "~4.8|~5.0",
"phpunit/phpunit": "^4.8.35|^5.4.3|~6.0",
"squizlabs/php_codesniffer": "1.*"
},
"autoload": {
Expand Down

0 comments on commit d8c299a

Please sign in to comment.