mirror of
https://github.com/shlinkio/shlink.git
synced 2025-02-25 18:45:27 -06:00
Fix merge conflicts
This commit is contained in:
@@ -5,7 +5,6 @@ declare(strict_types=1);
|
||||
namespace Shlinkio\Shlink\CLI\Command\Db;
|
||||
|
||||
use Doctrine\DBAL\Connection;
|
||||
use Doctrine\DBAL\Platforms\SqlitePlatform;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Doctrine\ORM\Mapping\ClassMetadata;
|
||||
use Shlinkio\Shlink\CLI\Util\ExitCode;
|
||||
@@ -80,10 +79,6 @@ class CreateDatabaseCommand extends AbstractDatabaseCommand
|
||||
|
||||
private function ensureDatabaseExistsAndGetTables(): array
|
||||
{
|
||||
if ($this->regularConn->getDriver()->getDatabasePlatform() instanceof SqlitePlatform) {
|
||||
return [];
|
||||
}
|
||||
|
||||
try {
|
||||
// Trying to list tables requires opening a connection to configured database.
|
||||
// If it fails, it means it does not exist yet.
|
||||
|
||||
@@ -7,7 +7,6 @@ namespace ShlinkioTest\Shlink\CLI\Command\Db;
|
||||
use Doctrine\DBAL\Connection;
|
||||
use Doctrine\DBAL\Driver;
|
||||
use Doctrine\DBAL\Platforms\AbstractPlatform;
|
||||
use Doctrine\DBAL\Platforms\SqlitePlatform;
|
||||
use Doctrine\DBAL\Schema\AbstractSchemaManager;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Doctrine\ORM\Mapping\ClassMetadata;
|
||||
@@ -129,18 +128,4 @@ class CreateDatabaseCommandTest extends TestCase
|
||||
yield 'no tables' => [[]];
|
||||
yield 'migrations table' => [['non_shlink_table']];
|
||||
}
|
||||
|
||||
#[Test]
|
||||
public function databaseCheckIsSkippedForSqlite(): void
|
||||
{
|
||||
$this->driver->method('getDatabasePlatform')->willReturn($this->createMock(SqlitePlatform::class));
|
||||
$this->regularConn->expects($this->never())->method('getParams');
|
||||
$this->schemaManager->expects($this->never())->method('listDatabases');
|
||||
$this->schemaManager->expects($this->never())->method('createDatabase');
|
||||
$this->schemaManager->expects($this->never())->method('listTableNames');
|
||||
|
||||
$this->metadataFactory->expects($this->once())->method('getAllMetadata')->willReturn([]);
|
||||
|
||||
$this->commandTester->execute([]);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user