Skip to content

Commit a282876

Browse files
committed
feat: refactor ByPassfinalsStartedSubscriberTest to use Instantiator for event creation
Signed-off-by: Felipe Sayão Lobato Abreu <github@mentordosnerds.com>
1 parent fbb4310 commit a282876

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

tests/PhpUnit/Event/TestSuite/ByPassfinalsStartedSubscriberTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
use PHPUnit\Framework\Attributes\Test;
2525
use PHPUnit\Framework\TestCase;
2626
use Prophecy\PhpUnit\ProphecyTrait;
27-
use ReflectionClass;
27+
use Symfony\Component\VarExporter\Instantiator;
2828

2929
#[CoversClass(ByPassfinalsStartedSubscriber::class)]
3030
final class ByPassfinalsStartedSubscriberTest extends TestCase
@@ -38,7 +38,7 @@ final class ByPassfinalsStartedSubscriberTest extends TestCase
3838
public function notifyWillEnableBypassFinals(): void
3939
{
4040
$subscriber = new ByPassfinalsStartedSubscriber();
41-
$event = (new ReflectionClass(Started::class))->newInstanceWithoutConstructor();
41+
$event = Instantiator::instantiate(Started::class);
4242

4343
$this->expectNotToPerformAssertions();
4444
$subscriber->notify($event);

0 commit comments

Comments
 (0)