Exemplo n.º 1
0
#!/usr/bin/env php
<?php 
/**
 * Runs unit tests
 *
 * @author Craig Campbell
 */
use Sonic\UnitTest\Runner;
$lib_path = str_replace('run_tests.php', '', realpath(__FILE__)) . '/../lib';
include $lib_path . '/Sonic/UnitTest/Runner.php';
try {
    Runner::start($_SERVER['argv']);
} catch (\Exception $e) {
    echo $e->getMessage(), "\n";
}
Exemplo n.º 2
0
 /**
  * called before each assertion to see if we should stop running
  * if an assertion failed within this method then we should not continue
  * with other tests
  *
  * @return bool
  */
 protected final function _stop()
 {
     $current = Runner::getInstance()->current();
     return !$this->passed($current[1]);
 }