Completed
Push — master ( d0acf1...b024d2 )
by Joachim
08:29
created

YamlTest::testTranslations()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 9
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 9
rs 9.6666
cc 2
eloc 6
nc 2
nop 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Loevgaard\DandomainConsignmentBundle\Tests;
6
7
use PHPUnit\Framework\TestCase;
8
use Symfony\Component\Finder\Finder;
9
use Symfony\Component\Yaml\Yaml;
10
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 testTranslations()
26
    {
27
        $finder = new Finder();
28
        $finder->files()->in(getcwd().'/Resources/translations');
29
        foreach($finder as $file) {
30
            $value = Yaml::parseFile($file->getPathname());
31
            $this->assertTrue(is_array($value));
32
        }
33
    }
34
}
35