/** * @param Adapter $adapter * @param Extractor $annotationExtractor * @param Generator $asserterGenerator * @param Manager $assertionManager * @param Closure $reflectionClassFactory * @param Closure $phpExtensionFactory * @param Analyzer $analyzer */ public function __construct(Adapter $adapter = null, Extractor $annotationExtractor = null, Generator $asserterGenerator = null, Manager $assertionManager = null, \Closure $reflectionClassFactory = null, \Closure $phpExtensionFactory = null, Analyzer $analyzer = null) { parent::__construct($adapter, $annotationExtractor, $asserterGenerator, $assertionManager, $reflectionClassFactory, $phpExtensionFactory, $analyzer); $this->getAsserterGenerator()->addNamespace('Cubiche\\Tests\\Asserters'); $this->getAssertionManager()->setAlias('mock', 'MockAsserter'); $this->faker = FakerFactory::create(); }
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() { $this->setMethodPrefix('case'); parent::__construct(); $protocol = Core::getInstance()->getProtocol(); $protocol['Test'] = new Core\Protocol\Generic('Test', null); $protocol['Test']['Vfs'] = new Test\Protocol\Vfs(); return; }
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; }
public function __construct() { $this->setMethodPrefix('case'); parent::__construct(); $protocol = Protocol::getInstance(); $protocol['Test'] = new Protocol\Node('Test', null); $protocol['Test']['Vfs'] = new Test\Protocol\Vfs(); $constantMocker = new Test\Mocker\Constant($this->getPhpFunctionMocker()); $this->getAssertionManager()->setPropertyHandler('constant', function () use($constantMocker) { return $constantMocker; }); return; }
function __construct() { $self = $this; $this->setMethodPrefix('case'); parent::__construct(); // Avoid conflict with \Mock. $this->getMockGenerator()->setDefaultNamespace('Mouck'); $assertionManager = $this->getAssertionManager(); // Register helpers. $helpers = new Helper\Helper(); $helpers->registerHelper('configuration', new Helper\Configuration()); $helpers->registerHelper('sqlite', new Helper\SQLite()); $helpers->registerHelper('mysql', new Helper\MySQL()); $helpers->registerHelper('temporaryFile', new Helper\TemporaryFile()); $helpers->registerHelper('temporaryDirectory', new Helper\TemporaryDirectory()); $assertionManager->setHandler('helper', function () use($helpers) { return $helpers; }); // let. $assertionManager->setMethodHandler('let', function () use($self) { return $self; }); }
public function __construct(\atoum\score $score = null, \atoum\locale $locale = null, \atoum\adapter $adapter = null) { $this->setTestNamespace('\\Test'); return parent::__construct($score, $locale, $adapter); }