1 | <?php |
||
11 | class YamlTest extends TestCase |
||
12 | { |
||
13 | public function testRouting() |
||
14 | { |
||
15 | $value = Yaml::parseFile(getcwd().'/Resources/config/routing.yml'); |
||
16 | $this->assertTrue(is_array($value)); |
||
17 | } |
||
18 | |||
19 | public function testServices() |
||
20 | { |
||
21 | $value = Yaml::parseFile(getcwd().'/Resources/config/services.yml'); |
||
22 | $this->assertTrue(is_array($value)); |
||
23 | } |
||
24 | |||
25 | public function testTranslationsValidYaml() |
||
34 | |||
35 | public function testTranslations() |
||
36 | { |
||
37 | $control = $this->flattenYamlFile(getcwd().'/Resources/translations/LoevgaardDandomainConsignmentBundle.en.yml'); |
||
38 | |||
39 | $finder = new Finder(); |
||
40 | $finder->files()->in(getcwd().'/Resources/translations'); |
||
41 | foreach ($finder as $file) { |
||
42 | $test = $this->flattenYamlFile($file->getPathname()); |
||
43 | |||
44 | $this->assertSame($control, $test); |
||
45 | } |
||
46 | } |
||
47 | |||
48 | private function flattenYamlFile(string $file): array |
||
59 | } |
||
60 |