public function setWith($value) { parent::setWith($value); $this->value = $value; $this->isSet = true; $this->isSetByReference = false; return $this; }
protected function fail($reason) { try { parent::fail($reason); } catch (asserter\exception $exception) { throw new test\exceptions\skip($reason); } }
public function setWithTest(atoum\test $test) { $this->reset(); $this->test = $test; $this->testedClassName = $test->getTestedClassName(); $this->phpClass->setWith($this->testedClassName); return parent::setWithTest($test); }
public function __get($property) { switch ($property) { case 'checkPredictions': return $this->checkPredictions(); default: return parent::__get($property); } }
public function __get($asserter) { switch (strtolower($asserter)) { case 'isloaded': return $this->{$asserter}(); default: return parent::__get($asserter); } }
public function __construct(asserter\generator $generator = null) { parent::__construct($generator); $this->call = new test\adapter\call(); if (self::$instances === null) { self::$instances = new \splObjectStorage(); } self::$instances->attach($this); }
public function __call($method, $arguments) { switch (strtolower($method)) { case 'extends': return call_user_func_array(array($this, 'isSubClassOf'), $arguments); case 'implements': return call_user_func_array(array($this, 'hasInterface'), $arguments); default: return parent::__call($method, $arguments); } }
public function setWith($class) { parent::setWith($class); try { $this->class = $this->getReflectionClass($class); } catch (\exception $exception) { $this->fail($this->_('Class \'%s\' does not exist', $class)); } $this->pass(); return $this; }
/** * @param string $method * @param array $arguments * * @return $this|mixed */ public function __call($method, $arguments) { switch ($method) { case 'defineMetric': case 'defineLayer': case 'assert': call_user_func_array(array($this->configuration, $method), $arguments); return $this; default: return parent::__call($method, $arguments); } }
public function __construct(atoum\asserter $asserter, $message) { $code = 0; $test = $asserter->getTest(); if ($test !== null) { $class = $test->getClass(); $method = $test->getCurrentMethod(); $file = $test->getPath(); $line = null; $function = null; foreach (array_filter(debug_backtrace(false), function ($backtrace) use($file) { return isset($backtrace['file']) === true && $backtrace['file'] === $file; }) as $backtrace) { if ($line === null && isset($backtrace['line']) === true) { $line = $backtrace['line']; } if ($function === null && isset($backtrace['object']) === true && isset($backtrace['function']) === true && $backtrace['object'] === $asserter && $backtrace['function'] !== '__call') { $function = $backtrace['function']; } } $code = $test->getScore()->addFail($file, $class, $method, $line, get_class($asserter) . ($function ? '::' . $function : '') . '()', $message); } parent::__construct($message, $code); }
public function __construct(atoum\asserter\generator $generator) { parent::__construct($generator); $this->setAdapter(); }
public function __construct(Model\Specification $specification = null, atoum\asserter\generator $generator = null) { $this->setSpecification($specification); parent::__construct($generator); }
public function __construct(atoum\asserter\generator $generator = null, atoum\adapter $adapter = null) { parent::__construct($generator); $this->setAdapter($adapter); }
public function __construct(atoum\asserter\generator $generator = null, atoum\test\score $score = null) { parent::__construct($generator); $this->setScore($score); }
public function reset() { $this->value = null; $this->isSet = false; return parent::reset(); }
public function setWithTest(test $test) { $this->setScore($test->getScore()); return parent::setWithTest($test); }
public function setWith($stream) { parent::setWith($stream); $this->streamController = atoum\mock\stream::get($stream); return $this; }
public function setWithTest(test $test) { $this->setManager($test->getAsserterCallManager()); return parent::setWithTest($test); }