public function testBasicGetView() { $state = new ContentTypeController_underTest_getView(); $oMap = new ControllerMap(__FILE__, '\\A.*\\Z'); $oMap->setView(testView::class); $state->setMap($oMap); $this->assertNull($state->getView()); }
public function setUp() { $this->state = new FrontController_underTest_setMap(); $oMap = new ControllerMap(__FILE__, '\\A.*\\Z'); $oMap->setView(testView::class); $oMap->setMainTemplatePath(VSC_FIXTURE_PATH . 'templates'); $oMap->setMainTemplate('main.tpl.php'); $this->state->setMap($oMap); }
public function testGetViewAfterBeingSet() { $state = new FrontControllerA_underTest_getView(); $oMap = new ControllerMap(__FILE__, '\\A.*\\Z'); $oMap->setView(testView::class); $state->setMap($oMap); $v = $state->getView(); $this->assertNotNull($v); $this->assertNotInstanceOf(Base::class, $v); $this->assertInstanceOf(testView::class, $v); $this->assertInstanceOf(ViewA::class, $v); }