Exemplo n.º 1
0
 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());
 }
Exemplo n.º 2
0
 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);
 }
Exemplo n.º 3
0
 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);
 }