예제 #1
0
 public function testPageTitle()
 {
     $controller = $this->getTestController();
     $controller->addPageTitle('Phwoolcon');
     $controller->addPageTitle('Test Title');
     $controller->render('test', 'controller-render');
     $this->assertEquals('Test Title - Phwoolcon', View::getPageTitle());
 }
예제 #2
0
 public function testPageVariables()
 {
     /* @var View $view */
     $view = $this->di->getShared('view');
     $view->setParams($params = ['page_title' => 'Test Title', 'page_keywords' => 'Test Keyword1,Test Keyword2', 'page_description' => 'Test Description']);
     $this->assertEquals($params['page_title'], View::getPageTitle());
     $this->assertEquals('zh-CN', View::getPageLanguage());
     $this->assertEquals($params['page_keywords'], View::getPageKeywords());
     $this->assertEquals($params['page_description'], View::getPageDescription());
 }