spec\PhpSpec\Formatter\TapFormatterSpec::it_outputs_progress_on_afterexample_event PHP Метод

it_outputs_progress_on_afterexample_event() публичный Метод

public it_outputs_progress_on_afterexample_event ( SpecificationEvent $specEvent, ExampleEvent $exampleEvent, ExampleNode $example, SpecificationNode $spec, ConsoleIO $io, PhpSpec\Listener\StatisticsCollector $stats )
$specEvent PhpSpec\Event\SpecificationEvent
$exampleEvent PhpSpec\Event\ExampleEvent
$example PhpSpec\Loader\Node\ExampleNode
$spec PhpSpec\Loader\Node\SpecificationNode
$io PhpSpec\Console\ConsoleIO
$stats PhpSpec\Listener\StatisticsCollector
    function it_outputs_progress_on_afterexample_event(SpecificationEvent $specEvent, ExampleEvent $exampleEvent, ExampleNode $example, SpecificationNode $spec, ConsoleIO $io, StatisticsCollector $stats)
    {
        $specEvent->getSpecification()->willReturn($spec);
        $exampleEvent->getExample()->willReturn($example);
        $exampleEvent->getResult()->willReturn(ExampleEvent::PASSED);
        $example->getTitle()->willReturn('it foobar');
        $spec->getTitle()->willReturn('spec1');
        $this->beforeSpecification($specEvent);
        $this->afterExample($exampleEvent);
        $example->getTitle()->willReturn('its foobar');
        $spec->getTitle()->willReturn('spec2');
        $this->beforeSpecification($specEvent);
        $this->afterExample($exampleEvent);
        $expected1 = 'ok 1 - spec1: foobar';
        $expected2 = 'ok 2 - spec2: foobar';
        $io->writeln($expected1)->shouldHaveBeenCalled();
        $io->writeln($expected2)->shouldHaveBeenCalled();
    }