Skip to content
This repository has been archived by the owner on Jan 31, 2020. It is now read-only.

Commit

Permalink
Updated test to work with PHPUnit 6
Browse files Browse the repository at this point in the history
Replaced deprecated method `setExpectedException`
  • Loading branch information
michalbundyra committed Oct 24, 2017
1 parent 6ebc16d commit 65a123c
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions test/ArrayObjectTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,8 @@ public function testAsort()
public function testCount()
{
if (version_compare(PHP_VERSION, '7.2', '>=')) {
$this->setExpectedException(
'PHPUnit_Framework_Error_Warning',
'Parameter must be an array or an object that implements Countable'
);
$this->expectException(\PHPUnit_Framework_Error_Warning::class);
$this->expectExceptionMessage('Parameter must be an array or an object that implements Countable');
}
$ar = new ArrayObject(new TestAsset\ArrayObjectObjectVars());
$this->assertCount(1, $ar);
Expand Down

0 comments on commit 65a123c

Please sign in to comment.