Example #1
0
 public function testUpdatePks()
 {
     $pks = array(1, 2, 3);
     $tests = UnitTest::update($pks, array('string_value' => 'derek name test'));
     $this->assertEquals(3, $tests->count());
     // check if names were updated
     $test = UnitTest::find(1);
     $this->assertEquals('derek name test', $test->string_value);
     $this->assertEquals('1', $test->integer_value);
     $test = UnitTest::find(2);
     $this->assertEquals('derek name test', $test->string_value);
     $this->assertEquals('2', $test->integer_value);
     $test = UnitTest::find(3);
     $this->assertEquals('derek name test', $test->string_value);
     $this->assertEquals('3', $test->integer_value);
 }