示例#1
0
 public function __construct($to_table, $join_table, $from_column = null, $from_join_column = null, $to_join_column = null, $to_column = null)
 {
     parent::__construct($to_table, $from_column, $to_column);
     $this->_join_table = $join_table;
     $this->_from_join_column = $from_join_column;
     $this->_to_join_column = $to_join_column;
 }
 public function testGuessFromColumn()
 {
     $assoc = new Phactory_Association_ManyToOne(new Phactory_Table('user'));
     $assoc->setFromTable(new Phactory_Table('post'));
     $this->assertEquals('user_id', $assoc->getFromColumn());
 }