Skip to content

Commit

Permalink
Remove bad test
Browse files Browse the repository at this point in the history
The test asserts against the internal state. We should remove that
  • Loading branch information
alcaeus committed Nov 13, 2019
1 parent 607baef commit b26c343
Showing 1 changed file with 0 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@
use Doctrine\DBAL\Connection;
use Doctrine\DBAL\Connections\MasterSlaveConnection;
use Doctrine\DBAL\Driver\IBMDB2\DB2Driver;
use Doctrine\DBAL\Platforms\AbstractPlatform;
use Doctrine\DBAL\Platforms\Keywords\KeywordList;
use Doctrine\DBAL\Schema\AbstractSchemaManager;
use Doctrine\Migrations\Configuration\Configuration;
use Doctrine\Migrations\DependencyFactory;
use Doctrine\Migrations\MigrationRepository;
Expand Down Expand Up @@ -256,29 +254,6 @@ public function methodsThatNeedsVersionsLoaded() : array
];
}

public function testGetQueryWriterCreatesAnInstanceIfItWasNotConfigured() : void
{
$dp = $this->getMockForAbstractClass(AbstractPlatform::class, [], '', false, true, true, ['getReservedKeywordsClass']);

$dp->method('getReservedKeywordsClass')
->willReturn(EmptyKeywordList::class);

$conn = $this->getConnectionMock();
$conn->method('getDatabasePlatform')
->willReturn($dp);

$schemaManager = $this->createMock(AbstractSchemaManager::class);

$conn->expects(self::any())
->method('getSchemaManager')
->willReturn($schemaManager);

$configuration = new Configuration($conn);
$queryWriter = $configuration->getQueryWriter();

self::assertAttributeSame($configuration->getOutputWriter(), 'outputWriter', $queryWriter);
}

public function testGetQueryWriterShouldReturnTheObjectGivenOnTheConstructor() : void
{
$queryWriter = $this->createMock(QueryWriter::class);
Expand Down

0 comments on commit b26c343

Please sign in to comment.