Commit 14f730fb authored by Steve Müller's avatar Steve Müller

Merge pull request #667 from JeroenDeDauw/selectallnoalias

Add tests for select all behaviour when not using a table alias
parents fce77af2 ac5e3f4f
......@@ -743,4 +743,24 @@ class QueryBuilderTest extends \Doctrine\Tests\DbalTestCase
$this->assertEquals('SELECT u.id FROM users u INNER JOIN permissions p ON p.user_id = u.id, articles INNER JOIN comments c ON c.article_id = articles.id', $qb->getSQL());
}
public function testSelectAllFromTableWithoutTableAlias()
{
$qb = new QueryBuilder($this->conn);
$qb->select('users.*')
->from('users');
$this->assertEquals("SELECT users.* FROM users", (string) $qb);
}
public function testSelectAllWithoutTableAlias()
{
$qb = new QueryBuilder($this->conn);
$qb->select('*')
->from('users');
$this->assertEquals("SELECT * FROM users", (string) $qb);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment