Example #1
0
 /**
  * Tests the update_dependency_id() function.
  */
 public function test_update_dependency_id()
 {
     $cond = new condition((object) array('id' => 123));
     $this->assertFalse($cond->update_dependency_id('frogs', 123, 456));
     $this->assertFalse($cond->update_dependency_id('groups', 12, 34));
     $this->assertTrue($cond->update_dependency_id('groups', 123, 456));
     $after = $cond->save();
     $this->assertEquals(456, $after->id);
 }