Exemplo n.º 1
0
 public function testGetDefinition()
 {
     $expected = array('owningAlias' => 'Author', 'owningTable' => 'user_id', 'owningField' => 'author', 'refAlias' => 'User', 'refTable' => 'id', 'refField' => 'user', 'type' => '1-1', 'onDelete' => 'CASCADE', 'onUpdate' => 'CASCADE', 'orderBy' => '');
     $rm = new Relation($expected['owningAlias'], $expected['owningTable'], $expected['owningField'], $expected['refAlias'], $expected['refTable'], $expected['refField'], $expected['type'], $expected['onDelete'], $expected['onUpdate']);
     $this->assertEquals($expected, $rm->getDefinition());
 }