Skip to content

Commit 73dfaf9

Browse files
committed
test: fix test code
1 parent 614d974 commit 73dfaf9

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

tests/TestDoubleTest.php

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,14 +71,19 @@ public function test_getDouble_returns_consecutive_and_other(): void
7171
public function test_getDouble_method_returns_execption(): void
7272
{
7373
$this->expectException(RuntimeException::class);
74-
$this->expectExceptionMessage('I can throw an exception and can use params: abcdef');
74+
$this->expectExceptionMessage(
75+
'I can throw an exception and can use params: abc1'
76+
);
7577

7678
$ret = static function ($param1, $param2): void {
77-
throw new RuntimeException('I can throw an exception and can use params: ' . $param1 . $param2);
79+
throw new RuntimeException(
80+
'I can throw an exception and can use params: '
81+
. $param1 . $param2
82+
);
7883
};
79-
$mock = $this->getDouble(Input::class, ['method' => $ret]);
84+
$mock = $this->getDouble(Input::class, ['get' => $ret]);
8085

81-
$mock->method();
86+
$mock->get('abc', true);
8287
}
8388

8489
public function test_getDouble_constructor_param(): void

0 commit comments

Comments
 (0)