本文整理匯總了PHP中PhpSpec\Event\SuiteEvent::getSuite方法的典型用法代碼示例。如果您正苦於以下問題:PHP SuiteEvent::getSuite方法的具體用法?PHP SuiteEvent::getSuite怎麽用?PHP SuiteEvent::getSuite使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類PhpSpec\Event\SuiteEvent
的用法示例。
在下文中一共展示了SuiteEvent::getSuite方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1:
function it_records_how_many_specs_are_in_the_suite(SuiteEvent $suiteEvent, Suite $suite, SpecificationNode $spec)
{
$suiteEvent->getSuite()->willReturn($suite);
$suite->getSpecifications()->willReturn(array($spec));
$this->beforeSuite($suiteEvent);
$this->getTotalSpecsCount()->shouldReturn(1);
}
示例2:
function it_outputs_the_progress_every_50_examples(ExampleEvent $exampleEvent, SuiteEvent $suiteEvent, ConsoleIO $io, StatisticsCollector $stats)
{
$exampleEvent->getResult()->willReturn(ExampleEvent::PASSED);
$suiteEvent->getSuite()->willReturn(range(1, 100));
$stats->getEventsCount()->willReturn(50);
$this->beforeSuite($suiteEvent);
$this->afterExample($exampleEvent);
$io->write(' 50 / 100')->shouldHaveBeenCalled();
}
示例3: beforeSuite
public function beforeSuite(SuiteEvent $suiteEvent)
{
$this->totalSpecsCount = count($suiteEvent->getSuite()->getSpecifications());
}
示例4: beforeSuite
/**
*
* @param SuiteEvent $event
*/
public function beforeSuite(SuiteEvent $event)
{
$this->examplesCount = count($event->getSuite());
}
示例5: beforeSuite
/**
* @param SuiteEvent $event
*/
public function beforeSuite(SuiteEvent $event)
{
$this->examplesCount = count($event->getSuite());
$this->getIO()->writeln($this->teamCityMessage("testCount", array("count" => $this->examplesCount)));
}
示例6: beforeSuite
public function beforeSuite(SuiteEvent $event)
{
$this->enabled = $this->maxSpecs >= count($event->getSuite()->getSpecifications());
}