Airship\UnitTests\AirshipTest::testArrayMultiDiff PHP Method

testArrayMultiDiff() public method

public testArrayMultiDiff ( )
    public function testArrayMultiDiff()
    {
        $old = [1 => ['read' => true, 'write' => true, 'execute' => true], 2 => ['read' => true, 'write' => false, 'execute' => true], 3 => ['read' => false, 'write' => false, 'execute' => false]];
        $new_1 = [1 => ['read' => true, 'write' => true, 'execute' => true], 3 => ['read' => true, 'write' => false, 'execute' => false]];
        $new_2 = [1 => ['read' => true, 'write' => true, 'execute' => true], 2 => ['read' => true, 'write' => false, 'execute' => true], 3 => ['read' => false, 'write' => false, 'execute' => false], 4 => ['read' => true, 'write' => false, 'execute' => false]];
        $this->assertSame([1 => [], 3 => ['read' => true]], \Airship\array_multi_diff($new_1, $old));
        $this->assertSame([4 => ['read' => true, 'write' => false, 'execute' => false], 1 => [], 2 => [], 3 => []], \Airship\array_multi_diff($new_2, $old));
        $this->assertSame([2 => ['read' => true, 'write' => false, 'execute' => true], 1 => [], 3 => ['read' => false]], \Airship\array_multi_diff($old, $new_1));
        $this->assertSame([1 => [], 2 => [], 3 => []], \Airship\array_multi_diff($old, $new_2));
    }