Completed
Push — develop ( 3851aa...435d68 )
by Adrien
21:08
created

testMappingOnlyContainExistingClasses()   A

Complexity

Conditions 4
Paths 3

Size

Total Lines 10
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 4
eloc 5
nc 3
nop 0
dl 0
loc 10
rs 9.2
c 0
b 0
f 0
1
<?php
2
3
namespace PhpOffice\PhpSpreadsheetTests\Helper;
4
5
use PhpOffice\PhpSpreadsheet\Helper\Migrator;
6
7
class MigratorTest extends \PHPUnit_Framework_TestCase
8
{
9
    public function testMappingOnlyContainExistingClasses()
10
    {
11
        $migrator = new Migrator();
12
13
        foreach ($migrator->getMapping() as $classname) {
14
            if (substr_count($classname, '\\')) {
15
                $this->assertTrue(class_exists($classname) || interface_exists($classname), 'mapping is wrong, class does not exists in project: ' . $classname);
16
            }
17
        }
18
    }
19
}
20