示例#1
0
 /**
  * @covers ElementType::search
  */
 public function testSearch()
 {
     $this->model->setAttributes($this->elementtypes('history')->getAttributes());
     $results = $this->model->search();
     $data = $results->getData();
     $expectedKeys = array('history', 'pasthistory');
     $expectedResults = array();
     if (!empty($expectedKeys)) {
         foreach ($expectedKeys as $key) {
             $expectedResults[] = $this->elementtypes($key);
         }
     }
     $this->assertEquals($expectedResults, $data);
 }