Completed
Push — scalar-types/theme ( 71f30c )
by Kamil
21:15
created

it_is_initializable()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
nc 1
cc 1
eloc 2
nop 0
1
<?php
2
3
/*
4
 * This file is part of the Sylius package.
5
 *
6
 * (c) Paweł Jędrzejewski
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
declare(strict_types=1);
13
14
namespace spec\Sylius\Bundle\ThemeBundle\Translation\Finder;
15
16
use PhpSpec\ObjectBehavior;
17
use Sylius\Bundle\ThemeBundle\Translation\Finder\OrderingTranslationFilesFinder;
18
use Sylius\Bundle\ThemeBundle\Translation\Finder\TranslationFilesFinderInterface;
19
20
/**
21
 * @author Kamil Kokot <[email protected]>
22
 */
23
final class OrderingTranslationFilesFinderSpec extends ObjectBehavior
24
{
25
    function let(TranslationFilesFinderInterface $translationFilesFinder): void
26
    {
27
        $this->beConstructedWith($translationFilesFinder);
28
    }
29
30
    function it_implements_Translation_Files_Finder_interface(): void
0 ignored issues
show
Coding Style introduced by
function it_implements_T...iles_Finder_interface() does not seem to conform to the naming convention (^(?:(?:[a-z]|__)[a-zA-Z0-9]*|[a-z][a-z0-9_]*)$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
31
    {
32
        $this->shouldImplement(TranslationFilesFinderInterface::class);
33
    }
34
35
    function it_puts_application_translations_files_before_bundle_translations_files(
36
        TranslationFilesFinderInterface $translationFilesFinder
37
    ): void {
38
        $translationFilesFinder->findTranslationFiles('/some/path/to/theme')->willReturn([
39
            '/some/path/to/theme/AcmeBundle/messages.en.yml',
40
            '/some/path/to/theme/translations/messages.en.yml',
41
            '/some/path/to/theme/YcmeBundle/messages.en.yml',
42
        ]);
43
44
        $this->findTranslationFiles('/some/path/to/theme')->shouldStartIteratingAs(['/some/path/to/theme/translations/messages.en.yml']);
45
    }
46
}
47