Exemple #1
0
/**
 * @param SuiteInterface $suite
 * @param string $name
 * @param callable $fn
 * @param array[] $arguments
 */
function _test(SuiteInterface $suite, $name, callable $fn, array $args = [])
{
    foreach ($args ?: [[]] as $_args) {
        $test = new Test($name, $fn, $_args);
        $suite->add($test);
    }
}
Exemple #2
0
 /**
  * {@inheritdoc}
  */
 public function execute(InputInterface $input, OutputInterface $output)
 {
     $this->suite->execute($this->handler);
 }
Exemple #3
0
/**
 * @param SuiteInterface $suite
 * @param string $name
 * @param callable $fn
 */
function _suite(SuiteInterface $parent, $name, callable $fn)
{
    $suite = new Suite($name);
    $parent->add($suite);
    $fn instanceof Closure ? $fn($suite) : call_user_func($fn, $suite);
}