public function setUp() { // Necessary to ensure placeholders do not persist between individual tests PlaceholderRegistry::unsetRegistry(); $this->renderer = new PhpRenderer(); $this->strategy = new PhpRendererStrategy($this->renderer); $this->event = new ViewEvent(); $this->response = new HttpResponse(); }
public function setUp() { \Zend\View\Helper\Placeholder\Registry::unsetRegistry(); $this->basePath = __DIR__ . '/_files/modules'; $renderer = new \Zend\View\Renderer\PhpRenderer(); $renderer->plugin('basePath')->setBasePath($this->basePath); $this->helper = new CtrlJsLoader(); $this->helper->setView($renderer); }
/** * Sets up the fixture, for example, open a network connection. * This method is called before a test is executed. * * @return void */ public function setUp() { PlaceholderRegistry::unsetRegistry(); Helper\Doctype::unsetDoctypeRegistry(); $this->basePath = __DIR__ . '/_files/modules'; $this->view = new View(); $this->helper = new Helper\HeadLink(); $this->helper->setView($this->view); }
/** * Sets up the fixture, for example, open a network connection. * This method is called before a test is executed. * * @return void */ public function setUp() { $this->error = false; PlaceholderRegistry::unsetRegistry(); Helper\Doctype::unsetDoctypeRegistry(); $this->basePath = __DIR__ . '/_files/modules'; $this->view = new View(); $this->view->plugin('doctype')->__invoke('XHTML1_STRICT'); $this->helper = new Helper\HeadMeta(); $this->helper->setView($this->view); }
public function _after(\Codeception\TestCase $test) { $_SESSION = array(); $_GET = array(); $_POST = array(); $_COOKIE = array(); // reset singleton StaticEventManager::resetInstance(); Placeholder\Registry::unsetRegistry(); $this->queries = 0; $this->time = 0; }
public function _after(\Codeception\TestCase $test) { $_SESSION = array(); $_GET = array(); $_POST = array(); $_COOKIE = array(); // reset singleton StaticEventManager::resetInstance(); // Reset singleton placeholder if version < 2.2.0, no longer required in 2.2.0+ if (Version::compareVersion('2.2.0') >= 0) { Placeholder\Registry::unsetRegistry(); } $this->queries = 0; $this->time = 0; }
public function _after(\Codeception\TestCase $test) { $_SESSION = []; $_GET = []; $_POST = []; $_COOKIE = []; // reset singleton StaticEventManager::resetInstance(); // Reset singleton placeholder if version < 2.2.0, no longer required in 2.2.0+ if (Version::compareVersion('2.2.0') >= 0) { Placeholder\Registry::unsetRegistry(); } //Close the session, if any are open if (session_status() == PHP_SESSION_ACTIVE) { session_write_close(); } $this->queries = 0; $this->time = 0; }
/** * Sets up the fixture, for example, open a network connection. * This method is called before a test is executed. * * @return void */ public function setUp() { Registry::unsetRegistry(); $this->basePath = __DIR__ . '/_files/modules'; $this->helper = new Helper\HeadTitle(); }
/** * Tears down the fixture, for example, close a network connection. * This method is called after a test is executed. * * @return void */ public function tearDown() { unset($this->placeholder); PlaceholderRegistry::unsetRegistry(); }
/** * Sets up the fixture, for example, open a network connection. * This method is called before a test is executed. * * @return void */ public function setUp() { Registry::unsetRegistry(); $this->registry = new Registry(); }
/** * Sets up the fixture, for example, open a network connection. * This method is called before a test is executed. * * @return void */ public function setUp() { \Zend\View\Helper\Placeholder\Registry::unsetRegistry(); $this->basePath = __DIR__ . '/_files/modules'; $this->helper = new Foo(); }
/** * Sets up the fixture, for example, open a network connection. * This method is called before a test is executed. * * @return void */ public function setUp() { Registry::unsetRegistry(); $this->basePath = __DIR__ . '/_files/modules'; $this->helper = new Helper\InlineScript(); }
/** * Reset the request * * @return AbstractControllerTestCase */ public function reset() { // force to re-create all components $this->application = null; // reset server datas $_SESSION = array(); $_GET = array(); $_POST = array(); $_COOKIE = array(); // reset singleton StaticEventManager::resetInstance(); Placeholder\Registry::unsetRegistry(); return $this; }