Example #1
0
 public function testModelNameAlias()
 {
     $q = BookQuery::create()->joinAuthor('a');
     $joins = $q->getJoins();
     $join = $joins['a'];
     $with = new ModelWith($join);
     $this->assertEquals($with->getModelName(), 'Author', 'A ModelWith computes the model peer name from the join');
     $this->assertEquals($with->getModelPeerName(), 'AuthorPeer', 'A ModelWith computes the model peer name from the join');
 }