diff --git a/tests/Doctrine/Tests/ORM/Query/SqlWalkerTest.php b/tests/Doctrine/Tests/ORM/Query/SqlWalkerTest.php index d057fc8e0..1ea0808b1 100644 --- a/tests/Doctrine/Tests/ORM/Query/SqlWalkerTest.php +++ b/tests/Doctrine/Tests/ORM/Query/SqlWalkerTest.php @@ -25,6 +25,17 @@ class SqlWalkerTest extends OrmTestCase $this->assertSame($expectedAlias, $sqlWalker->getSQLTableAlias($tableName)); } + /** + * @dataProvider getColumnNamesAndSqlAliases + */ + public function testGetSQLTableAliasIsSameForMultipleCalls($tableName) + { + $query = new Query($this->_getTestEntityManager()); + $sqlWalker = new SqlWalker($query, new ParserResult(), array()); + + $this->assertSame($sqlWalker->getSQLTableAlias($tableName), $sqlWalker->getSQLTableAlias($tableName)); + } + /** * @private data provider *