예제 #1
0
파일: ModelTest.php 프로젝트: rapzo/lithium
 public function testMultiRecordDelete()
 {
     $result = MockPost::remove(array('published' => false));
     $query = $result['query'];
     $this->assertEqual('delete', $query->type());
     $this->assertEqual(array('published' => false), $query->conditions());
     $keys = array_keys(array_filter($query->export(MockPost::connection())));
     $this->assertEqual(array('conditions', 'model', 'type', 'source', 'alias'), $keys);
 }
예제 #2
0
파일: ModelTest.php 프로젝트: EHER/chegamos
 public function testMultiRecordDelete()
 {
     $result = MockPost::remove(array('published' => false));
     $query = $result['query'];
     $this->assertEqual('delete', $query->type());
     $this->assertEqual(array('published' => false), $query->conditions());
     $keys = array_keys(array_filter($query->export(Connections::get('mock-source'))));
     $expected = array('name', 'conditions', 'model', 'source');
     $this->assertEqual($expected, $keys);
 }