示例#1
0
 /**
  * test that saveAll works even with conditions that lack a model name.
  *
  * @return void
  */
 public function testUpdateAllWithNonQualifiedConditions()
 {
     $this->loadFixtures('Boat');
     $Boat = new Boat();
     $result = $Boat->updateAll(array('title' => "'Awesome'"), array('title' => 'Third Boat'));
     $this->assertTrue($result);
     $result = $Boat->find('count', array('conditions' => array('Boat.title' => 'Awesome')));
     $this->assertEquals(1, $result, 'Boat count is wrong or fixture has changed.');
 }