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

YamlTest::testServices()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 5
rs 9.4285
cc 1
eloc 3
nc 1
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