fix: mockery tests being considered as risky

This commit is contained in:
Nuno Maduro
2020-05-24 20:00:30 +02:00
parent 340c7ca04e
commit 415f571910
2 changed files with 7 additions and 1 deletions

View File

@ -41,6 +41,12 @@ final class AfterEachRepository
return ChainableClosure::from(function (): void {
if (class_exists(Mockery::class)) {
/* @phpstan-ignore-next-line */
if ($container = Mockery::getContainer()) {
/* @phpstan-ignore-next-line */
$this->addToAssertionCount($container->mockery_getExpectationCount());
}
Mockery::close();
}
}, $afterEach);

View File

@ -11,5 +11,5 @@ it('has bar', function () {
->times(1)
->andReturn(2);
assertEquals(2, $mock->bar());
$mock->bar();
});