Skip to content

Commit

Permalink
Merge branch '7.x' into 8.x
Browse files Browse the repository at this point in the history
Signed-off-by: Mior Muhammad Zaki <[email protected]>
  • Loading branch information
crynobone committed Oct 28, 2023
2 parents c3a4ba0 + d93a3aa commit 023709d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Concerns/ApplicationTestingHooks.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
use Illuminate\Support\Facades\ParallelTesting;
use Illuminate\View\Component;
use Mockery;
use PHPUnit\Framework\TestCase;
use PHPUnit\Framework\TestCase as PHPUnitTestCase;
use Throwable;

trait ApplicationTestingHooks
Expand Down Expand Up @@ -104,7 +104,7 @@ final protected function tearDownTheApplicationTestingHooks(?Closure $callback =
\call_user_func($callback);
}

if (class_exists(Mockery::class)) {
if (class_exists(Mockery::class) && $this instanceof PHPUnitTestCase) {
if ($container = Mockery::getContainer()) {
$this->addToAssertionCount($container->mockery_getExpectationCount());
}
Expand Down Expand Up @@ -138,7 +138,7 @@ final protected function tearDownTheApplicationTestingHooks(?Closure $callback =
*/
protected function setUpParallelTestingCallbacks(): void
{
if (class_exists(ParallelTesting::class) && $this instanceof TestCase) {
if (class_exists(ParallelTesting::class) && $this instanceof PHPUnitTestCase) {
/** @phpstan-ignore-next-line */
ParallelTesting::callSetUpTestCaseCallbacks($this);
}
Expand All @@ -149,7 +149,7 @@ protected function setUpParallelTestingCallbacks(): void
*/
protected function tearDownParallelTestingCallbacks(): void
{
if (class_exists(ParallelTesting::class) && $this instanceof TestCase) {
if (class_exists(ParallelTesting::class) && $this instanceof PHPUnitTestCase) {
/** @phpstan-ignore-next-line */
ParallelTesting::callTearDownTestCaseCallbacks($this);
}
Expand Down

0 comments on commit 023709d

Please sign in to comment.