feat: reworks evalution of Test Case

This commit is contained in:
Nuno Maduro
2021-11-14 19:58:25 +00:00
parent cd34f0ba81
commit 4b213d63bd
26 changed files with 603 additions and 620 deletions

View File

@ -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,
));
}
}
}

View File

@ -16,6 +16,8 @@ final class BootExceptionHandler
*/
public function __invoke(): void
{
(new Collision\Provider())->register();
$handler = new Collision\Provider();
$handler->register();
}
}

View File

@ -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) {