diff --git a/lib/Doctrine/DBAL/Schema/DB2SchemaManager.php b/lib/Doctrine/DBAL/Schema/DB2SchemaManager.php index 069157233b2..01e9c9a38f8 100644 --- a/lib/Doctrine/DBAL/Schema/DB2SchemaManager.php +++ b/lib/Doctrine/DBAL/Schema/DB2SchemaManager.php @@ -41,9 +41,7 @@ public function listTableNames() $tables = $this->_conn->fetchAll($sql); - $tableNames = $this->_getPortableTablesList($tables); - - return $this->filterAssetNames($tableNames); + return $this->filterAssetNames($this->_getPortableTablesList($tables)); } /** diff --git a/tests/Doctrine/Tests/DBAL/Schema/DB2SchemaManagerTest.php b/tests/Doctrine/Tests/DBAL/Schema/DB2SchemaManagerTest.php index 199017e99c3..69da08db4af 100644 --- a/tests/Doctrine/Tests/DBAL/Schema/DB2SchemaManagerTest.php +++ b/tests/Doctrine/Tests/DBAL/Schema/DB2SchemaManagerTest.php @@ -15,7 +15,7 @@ final class DB2SchemaManagerTest extends \PHPUnit_Framework_TestCase { /** - * @var Connection + * @var Connection|\PHPUnit_Framework_MockObject_MockObject */ private $conn; @@ -37,6 +37,11 @@ protected function setUp() $this->manager = new DB2SchemaManager($this->conn); } + /** + * @group DBAL-2701 + * @see https://github.com/doctrine/dbal/issues/2701 + * @return void + */ public function testListTableNamesFiltersAssetNamesCorrectly() { $this->conn->getConfiguration()->setFilterSchemaAssetsExpression('/^(?!T_)/');