function testIncludesParentsForNestedMatches()
 {
     $parent = $this->objFromFixture('Page', 'page3');
     $child = $this->objFromFixture('Page', 'page3b');
     $f = new CMSSiteTreeFilter_Search(array('Title' => 'Page 3b'));
     $results = $f->pagesIncluded();
     $this->assertTrue($f->isPageIncluded($parent));
     $this->assertTrue($f->isPageIncluded($child));
     $this->assertEquals(1, count($results));
     $this->assertEquals(array('ID' => $child->ID, 'ParentID' => $parent->ID), $results[0]);
 }
 public function testDateFromToLastSameDate()
 {
     $draftPage = $this->objFromFixture('Page', 'page4');
     // Grab the date
     $date = substr($draftPage->LastEdited, 0, 10);
     // Filter with that date
     $filter = new CMSSiteTreeFilter_Search(array('LastEditedFrom' => $date, 'LastEditedTo' => $date));
     $this->assertTrue($filter->isPageIncluded($draftPage), 'Using the same date for from and to should show find that page');
 }