Skip to content

Commit 949db82

Browse files
committed
Use assertions
1 parent 334e22d commit 949db82

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/StaticMethodMock.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -74,12 +74,8 @@ public static function handleStaticCall(string $className, string $method, array
7474
$mock->testCase->fail(sprintf('StaticMethodMock no expectations left for %s::%s', $className, $method));
7575
}
7676
$expected = array_shift($mock->expectations);
77-
if ($expected['method'] != strtoupper($method)) {
78-
$mock->testCase->assertEquals($expected['method'], strtoupper($method), sprintf('StaticMethodMock method mismatch for %s::%s', $className, $method));
79-
}
80-
if ($expected['arguments'] != $arguments) {
81-
$mock->testCase->assertEquals($expected['arguments'], $arguments, sprintf('StaticMethodMock arguments mismatch for %s::%s', $className, $method));
82-
}
77+
$mock->testCase->assertEquals($expected['method'], strtoupper($method), sprintf('StaticMethodMock method mismatch for %s::%s', $className, $method));
78+
$mock->testCase->assertEquals($expected['arguments'], $arguments, sprintf('StaticMethodMock arguments mismatch for %s::%s', $className, $method));
8379
if ($expected['exception'] !== null) {
8480
throw $expected['exception'];
8581
}

0 commit comments

Comments
 (0)