Ejemplo n.º 1
0
 public function __construct($plan = null, $options = array())
 {
     // for BC
     if (!is_array($options)) {
         $options = array();
         // drop the old output because it is not compatible with LimeTest
     }
     parent::__construct($plan, $options);
 }
 public function __construct($plan = null, array $options = array())
 {
     parent::__construct($plan, $options);
     $this->testRunner = new LimeTestRunner($this->getOutput());
     $this->testRunner->addBefore(array($this, 'setUp'));
     $this->testRunner->addAfter(array($this, 'tearDown'));
     // attention: the following lines are not tested
     $this->testRunner->addExceptionHandler(array($this, 'handleException'));
     $this->testRunner->addAfter(array($this, 'verifyException'));
     foreach (get_class_methods($this) as $method) {
         if (strpos($method, 'test') === 0 && strlen($method) > 4) {
             $this->testRunner->addTest(array($this, $method), $this->humanize($method));
         }
     }
 }
Ejemplo n.º 3
0
 public function __construct(LimeConfiguration $configuration = null)
 {
     parent::__construct($configuration);
     $this->testRunner = new LimeTestRunner($this->getOutput());
     $this->testRunner->addBefore(array($this, 'beginTest'));
     $this->testRunner->addBefore(array($this, 'setUp'));
     $this->testRunner->addAfter(array($this, 'tearDown'));
     // attention: the following lines are not tested
     $this->testRunner->addExceptionHandler(array($this, 'handleException'));
     $this->testRunner->addAfter(array($this, 'endTest'));
     $class = new ReflectionClass($this);
     foreach ($class->getMethods() as $method) {
         if (strpos($method->getName(), 'test') === 0 && strlen($method->getName()) > 4) {
             $this->testRunner->addTest(array($this, $method->getName()), $this->humanize($method->getName()), $method->getFileName(), $method->getStartLine());
         }
     }
 }
Ejemplo n.º 4
0
 /**
  * Constructor.
  */
 public function __construct()
 {
     parent::__construct(0, array('output' => new LimeOutputNone()));
 }
Ejemplo n.º 5
0
 public function __construct($plan = null, $options = array())
 {
     // the options are dropped because they are not compatible anymore
     parent::__construct($plan);
 }