Skip to content

Commit 76f9595

Browse files
committed
Call protected expectException
1 parent 3e5ba9f commit 76f9595

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tests/PendingConveyorBeltCommand.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
namespace Glhd\ConveyorBelt\Tests;
44

5+
use Closure;
56
use Illuminate\Foundation\Application;
67
use Illuminate\Support\Traits\ForwardsCalls;
78
use Illuminate\Testing\PendingCommand;
@@ -68,7 +69,8 @@ public function throwingExceptions(bool $throw): self
6869
{
6970
if ($throw) {
7071
$this->parameters['--throw'] = true;
71-
$this->test->expectException(RuntimeException::class);
72+
// expectException is protected
73+
(fn() => $this->expectException(RuntimeException::class))->call($this->test);
7274
}
7375

7476
return $this;

0 commit comments

Comments
 (0)