Exemplo n.º 1
0
 public function endTest(PHPUnit_Framework_Test $test, $time)
 {
     if ($this->coverage) {
         $this->coverage->stop();
     }
     return;
 }
Exemplo n.º 2
0
 public function afterExample(ExampleEvent $event)
 {
     $type = $this->map[$event->getResult()];
     $this->addResult($type, $event->getSpecification(), $event->getTitle());
     if ($this->coverage) {
         $this->coverage->stop();
     }
 }
 function it_should_stop_coverage_on_afterStep_event(CodeCoverageSession $coverageSession, StepEvent $step, StepNode $node)
 {
     $step->getStep()->willReturn($node);
     $step->getResult()->willReturn(StepEvent::PASSED);
     $coverageSession->stop()->shouldBeCalled();
     $this->afterStep($step);
 }
 function it_should_creates_result_event(ExampleEvent $exampleEvent, SpecificationNode $specificationNode, CodeCoverageSession $coverageSession)
 {
     $exampleEvent->getResult()->shouldBeCalled()->willReturn(ExampleEvent::PASSED);
     $specificationNode->getTitle()->shouldBeCalled()->willReturn('SomeSpesification');
     $coverageSession->stop()->shouldBeCalled();
     $this->afterExample($exampleEvent);
     $this->getResults()->shouldHaveCount(1);
 }
Exemplo n.º 5
0
 function it_should_stop_coverage_when_test_ended(\PhpGuard\Application\Bridge\CodeCoverage\CodeCoverageSession $coverageRunner, MockTestCase $test)
 {
     $coverageRunner->stop()->shouldBeCalled();
     $this->endTest($test, 0);
 }
Exemplo n.º 6
0
 private function stopCoverage()
 {
     if ($this->coverageSession) {
         $this->coverageSession->stop();
     }
 }