Completed
Push — master ( 17598f...abee1f )
by Kirill
13s queued 11s
created

ExportTest::testReset()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 13
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 8
nc 1
nop 0
dl 0
loc 13
rs 10
c 0
b 0
f 0
1
<?php
2
3
/**
4
 * Spiral Framework.
5
 *
6
 * @license   MIT
7
 * @author    Anton Titov (Wolfy-J)
8
 */
9
10
declare(strict_types=1);
11
12
namespace Spiral\Tests\Framework\I18n;
13
14
use Spiral\Tests\Framework\ConsoleTest;
15
16
class ExportTest extends ConsoleTest
17
{
18
    public function tearDown(): void
19
    {
20
        parent::tearDown();
21
22
        if (file_exists(sys_get_temp_dir() . '/messages.ru.php')) {
23
            unlink(sys_get_temp_dir() . '/messages.ru.php');
24
        }
25
    }
26
27
    public function testReset(): void
28
    {
29
        $this->assertFalse(is_file(sys_get_temp_dir() . '/messages.ru.php'));
30
31
        $this->runCommandDebug('i18n:index');
32
        $this->runCommandDebug('configure');
33
34
        $this->runCommandDebug(
35
            'i18n:export',
36
            [
37
                'locale'     => 'ru',
38
                'path'       => sys_get_temp_dir(),
39
                '--fallback' => 'en',
40
            ]
41
        );
42
    }
43
}
44