sqlWalker = new SqlWalker(new Query($this->_getTestEntityManager()), new ParserResult(), array()); } /** * @dataProvider getColumnNamesAndSqlAliases */ public function testGetSQLTableAlias($tableName, $expectedAlias) { $this->assertSame($expectedAlias, $this->sqlWalker->getSQLTableAlias($tableName)); } /** * @dataProvider getColumnNamesAndSqlAliases */ public function testGetSQLTableAliasIsSameForMultipleCalls($tableName) { $this->assertSame( $this->sqlWalker->getSQLTableAlias($tableName), $this->sqlWalker->getSQLTableAlias($tableName) ); } /** * @private data provider * * @return string[][] */ public function getColumnNamesAndSqlAliases() { return array( array('aaaaa', 'a0_'), array('table', 't0_'), array('çtable', 't0_'), ); } }