mirror of
https://github.com/pestphp/pest.git
synced 2026-03-06 07:47:22 +01:00
fix: mockery tests being considered as risky
This commit is contained in:
@ -41,6 +41,12 @@ final class AfterEachRepository
|
|||||||
|
|
||||||
return ChainableClosure::from(function (): void {
|
return ChainableClosure::from(function (): void {
|
||||||
if (class_exists(Mockery::class)) {
|
if (class_exists(Mockery::class)) {
|
||||||
|
/* @phpstan-ignore-next-line */
|
||||||
|
if ($container = Mockery::getContainer()) {
|
||||||
|
/* @phpstan-ignore-next-line */
|
||||||
|
$this->addToAssertionCount($container->mockery_getExpectationCount());
|
||||||
|
}
|
||||||
|
|
||||||
Mockery::close();
|
Mockery::close();
|
||||||
}
|
}
|
||||||
}, $afterEach);
|
}, $afterEach);
|
||||||
|
|||||||
@ -11,5 +11,5 @@ it('has bar', function () {
|
|||||||
->times(1)
|
->times(1)
|
||||||
->andReturn(2);
|
->andReturn(2);
|
||||||
|
|
||||||
assertEquals(2, $mock->bar());
|
$mock->bar();
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user