8000 Updated test to work with PHPUnit 6 · zendframework/zend-stdlib@65a123c · GitHub
[go: up one dir, main page]

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

Commit 65a123c

Browse files
committed
Updated test to work with PHPUnit 6
Replaced deprecated method `setExpectedException`
1 parent 6ebc16d commit 65a123c

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

test/ArrayObjectTest.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -105,10 +105,8 @@ public function testAsort()
105105
public function testCount()
106106
{
107107
if (version_compare(PHP_VERSION, '7.2', '>=')) {
108-
$this->setExpectedException(
109-
'PHPUnit_Framework_Error_Warning',
110-
'Parameter must be an array or an object that implements Countable'
111-
);
108+
$this->expectException(\PHPUnit_Framework_Error_Warning::class);
109+
$this->expectExceptionMessage('Parameter must be an array or an object that implements Countable');
112110
}
113111
$ar = new ArrayObject(new TestAsset\ArrayObjectObjectVars());
114112
$this->assertCount(1, $ar);

0 commit comments

Comments
 (0)
0