예제 #1
0
파일: ThemeTest.php 프로젝트: ollietb/sulu
 public function testAddErrorTemplateDefault()
 {
     $expected = ['key' => 'foo', 'defaultTemplates' => [], 'errorTemplates' => ['404' => 'template404', 'default' => 'template']];
     $theme = new Theme();
     $theme->setKey($expected['key']);
     $theme->addErrorTemplate('default', 'template');
     $theme->addErrorTemplate('404', 'template404');
     $this->assertEquals('template404', $theme->getErrorTemplate(404));
     $this->assertEquals('template', $theme->getErrorTemplate(500));
     $this->assertEquals($expected, $theme->toArray());
     $this->assertEquals($expected['errorTemplates'], $theme->getErrorTemplates());
 }