Completed
Push — master ( ae5e03...0447ee )
by Jeroen
10:35 queued 04:37
created

unit/Service/Migrations/MigrationsServiceTest.php (1 issue)

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<?php
2
3
namespace Kunstmaan\TranslatorBundle\Tests\Service\Migrations;
4
5
use Kunstmaan\TranslatorBundle\Service\Migrations\MigrationsService;
6
use Kunstmaan\TranslatorBundle\Tests\unit\WebTestCase;
7
8
class MigrationsServiceTest extends WebTestCase
9
{
10
    private $migrationsService;
11
12 View Code Duplication
    public function setUp()
0 ignored issues
show
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
13
    {
14
        static::bootKernel(['test_case' => 'TranslatorBundleTest', 'root_config' => 'config.yaml']);
15
        $container = static::$kernel->getContainer();
16
        static::loadFixtures($container);
17
18
        /* @var MigrationsService migrationsService */
19
        $this->migrationsService = $container->get('kunstmaan_translator.service.migrations.migrations');
20
    }
21
22
    /**
23
     * @group migrations
24
     */
25
    public function testGetDiffSqlArray()
26
    {
27
        $result = $this->migrationsService->getDiffSqlArray();
28
        $this->assertGreaterThanOrEqual(1, \count($result));
29
        $this->assertStringStartsWith('INSERT INTO "kuma_translation"', $result[0]);
30
    }
31
}
32