Test Setup Failed
Branch master (ba7819)
by David
01:48
created

WarehouseMatrixTest::testWarehouseConstructor()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 5
rs 10
1
<?php
2
3
use GGGGino\WarehousePath\Warehouse;
4
use PHPUnit\Framework\TestCase;
5
6
final class WarehouseMatrixTest extends TestCase
7
{
8
    /**
9
     * Super simple warehouse representation
10
     *
11
     * @return array
12
     */
13
    public static function getSampleData()
14
    {
15
        return array(
16
            array(array('weight' => 2), array('weight' => 1), array('weight' => 100), array('weight' => 1), array('weight' => 2), array('weight' => 1)),
17
            array(array('weight' => 2), array('weight' => 1), array('weight' => 100), array('weight' => 1), array('weight' => 2), array('weight' => 1)),
18
            array(array('weight' => 2), array('weight' => 1), array('weight' => 100), array('weight' => 1), array('weight' => 2), array('weight' => 1)),
19
            array(array('weight' => 2), array('weight' => 2), array('weight' =>   2), array('weight' => 2), array('weight' => 2), array('weight' => 1))
20
        );
21
    }
22
23
    public function testWarehouseConstructor(): void
24
    {
25
        $testMatrix = Warehouse::createFromMatrix(self::getSampleData());
26
27
        $this->assertInstanceOf(Warehouse::class, $testMatrix);
28
    }
29
}