mirror of
https://github.com/pestphp/pest.git
synced 2026-03-11 18:27:23 +01:00
feat: reworks evalution of Test Case
This commit is contained in:
@ -1,29 +0,0 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Pest\Bootstrappers;
|
||||
|
||||
use Pest\Emitters\DispatchingEmitter;
|
||||
use PHPUnit\Event;
|
||||
use ReflectionClass;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
final class BootEmitter
|
||||
{
|
||||
/**
|
||||
* Boots the Event Emitter.
|
||||
*/
|
||||
public function __invoke(): void
|
||||
{
|
||||
if (!($baseEmitter = Event\Facade::emitter()) instanceof DispatchingEmitter) {
|
||||
$reflectedClass = new ReflectionClass(Event\Facade::class);
|
||||
|
||||
$reflectedClass->setStaticPropertyValue('emitter', new DispatchingEmitter(
|
||||
$baseEmitter,
|
||||
));
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -16,6 +16,8 @@ final class BootExceptionHandler
|
||||
*/
|
||||
public function __invoke(): void
|
||||
{
|
||||
(new Collision\Provider())->register();
|
||||
$handler = new Collision\Provider();
|
||||
|
||||
$handler->register();
|
||||
}
|
||||
}
|
||||
|
||||
@ -35,8 +35,7 @@ final class BootFiles
|
||||
*/
|
||||
public function __invoke(): void
|
||||
{
|
||||
$rootPath = TestSuite::getInstance()->rootPath;
|
||||
|
||||
$rootPath = TestSuite::getInstance()->rootPath;
|
||||
$testsPath = $rootPath . DIRECTORY_SEPARATOR . testDirectory();
|
||||
|
||||
foreach (self::STRUCTURE as $filename) {
|
||||
|
||||
Reference in New Issue
Block a user