public function testJoin() { $authors = new AuthorCollection(); $authors->join(new \AuthorBooks\Model\Address()); $authors->fetch(); $sql = $authors->toSQL(); like('/addresses.address\\s+AS\\s+addresses_address/', $sql); }
/** * @rebuild false */ public function testJoinWithAliasAndWithoutRelationId() { $authors = new AuthorCollection(); $authors->join(new \AuthorBooks\Model\Address(), 'LEFT', 'a'); $authors->fetch(); $sql = $authors->toSQL(); ok($sql); }