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();
 }
Example #2
0
 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);
 }
Example #4
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()
 {
     $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);
 }
Example #5
0
 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;
 }
Example #6
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;
 }
Example #7
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;
 }
Example #8
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();
 }
Example #10
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->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();
 }
Example #12
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\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;
 }