Example #1
0
 public function testShouldPromptOnAddPageAndChildShouldPromptOnAddPage()
 {
     $values = [Page::ADD_PAGE_PROMPT => true, Page::ADD_PAGE_CHILD => false, Page::ADD_PAGE_SIBLING => false, null => true, 0 => true, 'asflsdkjfl' => true];
     foreach ($values as $behaviour => $shouldPrompt) {
         $page = new Page([Page::ATTR_ADD_BEHAVIOUR => $behaviour, Page::ATTR_CHILD_ADD_BEHAVIOUR => $behaviour]);
         $this->assertEquals($shouldPrompt, $page->shouldPromptOnAddPage());
         $this->assertEquals($shouldPrompt, $page->childShouldPromptOnAddPage());
     }
 }