function it_should_add_succeed_result_if_test_has_no_failed_results(MockTestSuite $suite) { // not processing for class::method $suite->getName()->willReturn('SomeClass::Foo'); $this->endTestSuite($suite); $this->getResults()->shouldHaveCount(0); // not processing for unexistent class $suite->getName()->willReturn('SomeClass'); $this->endTestSuite($suite); $this->getResults()->shouldHaveCount(0); $suite->getName()->willReturn(__CLASS__); $this->shouldNotBeFailed(); $this->endTestSuite($suite); $result = $this->getResults(); $result = $result[0]; $result->shouldBeSucceed(); }