Filter::apply($this->specs, 'load', 'spec.load');
Filter::register('spec.reporters', function ($chain) use(&$order) {
$order[] = 'reporters';
});
Filter::apply($this->specs, 'reporters', 'spec.reporters');
Filter::register('spec.matchers', function ($chain) use(&$order) {
$order[] = 'matchers';
});
Filter::apply($this->specs, 'matchers', 'spec.matchers');
Filter::register('spec.run', function ($chain) use(&$order) {
$order[] = 'run';
});
Filter::apply($this->specs, 'run', 'spec.run');
Filter::register('spec.reporting', function ($chain) use(&$order) {
$order[] = 'reporting';
});
Filter::apply($this->specs, 'reporting', 'spec.reporting');
Filter::register('spec.stop', function ($chain) use(&$order) {
$order[] = 'stop';
});
Filter::apply($this->specs, 'stop', 'spec.stop');
Filter::register('spec.quit', function ($chain) use(&$order) {
$order[] = 'quit';
});
Filter::apply($this->specs, 'quit', 'spec.quit');
$this->specs->run();
expect($order)->toBe(['bootstrap', 'interceptor', 'namespaces', 'patchers', 'load', 'reporters', 'matchers', 'run', 'reporting', 'stop', 'quit']);
Interceptor::unpatch();
});
});
});