function beforeTestMethod($methodName) { $out = parent::beforeTestMethod($methodName); $testedClassName = self::getTestedClassNameFromTestClass($this->getClass(), $this->getTestNamespace()); $testedNamespace = substr($testedClassName, 0, strrpos($testedClassName, '\\')); $this->getPhpMocker()->setDefaultNamespace($testedNamespace); return $out; }
public function __construct() { parent::__construct(); $this->fwk = new Fwk(); $this->fwk->kit('foo', new \Xyl()); $this->fwk->kit('bar', new \Xyl()); $this->fwk->kit('wux', new \Xyl()); $this->kit = new _Kit($this->fwk->getRouter(), $this->fwk->getDispatcher(), $this->fwk->getView(), $this->fwk); }
public function __construct() { parent::__construct(); $fwk = new Framework(); $this->_router = $fwk->getRouter(); $this->_view = $fwk->getView(); $this->_router->any('/(?<_call>.[^/]+)/(?<_able>.*)', array('as' => 'c', 'to' => 'main#index')); $this->_router->any('/', array('as' => 'm', 'to' => 'main#index')); $kit = new Kit($this->_router, $fwk->getDispatcher(), $this->_view, $fwk); $this->_kit = $kit->greut; }
/** * {@inheritdoc} * * @see \mageekguy\atoum\test::getTestedClassName() */ public function getTestedClassName() { $className = parent::getTestedClassName(); return substr($className, 0, strrpos($className, 'Tests')); }
public function __construct(\atoum\score $score = null, \atoum\locale $locale = null, \atoum\adapter $adapter = null) { $this->setTestNamespace('\\Test'); return parent::__construct($score, $locale, $adapter); }