You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
939 B
34 lines
939 B
|
4 years ago
|
<?php
|
||
|
|
|
||
|
|
declare(strict_types=1);
|
||
|
|
|
||
|
|
/* For licensing terms, see /license.txt */
|
||
|
|
|
||
|
|
namespace Chamilo\Tests\CoreBundle\Migrations;
|
||
|
|
|
||
|
|
use Chamilo\Tests\ChamiloTestTrait;
|
||
|
|
use Symfony\Bundle\FrameworkBundle\Console\Application;
|
||
|
|
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
|
||
|
|
use Symfony\Component\Console\Tester\CommandTester;
|
||
|
|
|
||
|
|
class MigrationTest extends KernelTestCase
|
||
|
|
{
|
||
|
|
use ChamiloTestTrait;
|
||
|
|
|
||
|
|
public function testMigrations(): void
|
||
|
|
{
|
||
|
|
$kernel = static::createKernel();
|
||
|
|
$application = new Application($kernel);
|
||
|
|
|
||
|
|
$command = $application->find('doctrine:migrations:status');
|
||
|
|
$commandTester = new CommandTester($command);
|
||
|
|
$commandTester->execute([
|
||
|
|
// pass arguments to the helper
|
||
|
|
'--no-interaction',
|
||
|
|
]);
|
||
|
|
|
||
|
|
$output = $commandTester->getDisplay();
|
||
|
|
$this->assertStringContainsString('Chamilo\CoreBundle\Migrations\Schema\V200', $output);
|
||
|
|
}
|
||
|
|
}
|