Skip to content
This repository was archived by the owner on Feb 21, 2025. It is now read-only.

Commit fc9ca8a

Browse files
committed
Add more tests
1 parent 196d98c commit fc9ca8a

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

tests/SampleTest.hh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,4 +272,18 @@ class SampleTest extends \Usox\HackMock\HackMock {
272272

273273
$sample->intOrNullWithDefault(55);
274274
}
275+
276+
public function testDuplicateExpectationWorks(): void {
277+
$sample = mock(SampleBaseClass::class);
278+
279+
prospect($sample, 'intOrNullWithDefault')
280+
->with(55)
281+
->once();
282+
prospect($sample, 'intOrNullWithDefault')
283+
->with(55)
284+
->once();
285+
286+
$sample->intOrNullWithDefault(55);
287+
$sample->intOrNullWithDefault(55);
288+
}
275289
}

0 commit comments

Comments
 (0)