Skip to content

Commit

Permalink
Corrections from PR review for DB2SchemaManager and related test
Browse files Browse the repository at this point in the history
  • Loading branch information
asgrim committed Apr 20, 2017
1 parent da1d4c1 commit 31195d9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
4 changes: 1 addition & 3 deletions lib/Doctrine/DBAL/Schema/DB2SchemaManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}

/**
Expand Down
7 changes: 6 additions & 1 deletion tests/Doctrine/Tests/DBAL/Schema/DB2SchemaManagerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
final class DB2SchemaManagerTest extends \PHPUnit_Framework_TestCase
{
/**
* @var Connection
* @var Connection|\PHPUnit_Framework_MockObject_MockObject
*/
private $conn;

Expand All @@ -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_)/');
Expand Down

0 comments on commit 31195d9

Please sign in to comment.