Exemplo n.º 1
0
 function testUpdateRawWithCriteria()
 {
     $object1 = $this->creator->createOneTableObject();
     $object2 = $this->creator->createOneTableObject();
     lmbActiveRecord::updateRaw('TestOneTableObject', array('content' => 'blah'), lmbActiveRecord::getDefaultConnection()->quoteIdentifier("id") . '=' . $object2->getId());
     $rs = lmbActiveRecord::find('TestOneTableObject');
     $rs->rewind();
     $this->assertEqual($rs->current()->getContent(), $object1->getContent());
     $rs->next();
     $this->assertEqual($rs->current()->getContent(), 'blah');
     $rs->next();
     $this->assertFalse($rs->valid());
 }