Commit ac5e3f4f authored by jeroendedauw's avatar jeroendedauw

Add tests for select all behaviour when not using a table alias

parent fce77af2
......@@ -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