Completed
Pull Request — master (#2)
by Mathieu
08:19
created

AssertArraysTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 3
dl 0
loc 16
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A testAssertArrayStructureEquals() 11 11 1
1
<?php
2
3
namespace LaravelFr\Tests;
4
5
use LaravelFr\ApiTesting\AssertArrays;
6
use LaravelFr\ApiTesting\Tests\Stubs\JsonSerializableMixedResourcesStub;
7
use PHPUnit_Framework_TestCase;
8
9
class AssertArraysTest extends PHPUnit_Framework_TestCase
10
{
11
    use AssertArrays;
12
13 View Code Duplication
    public function testAssertArrayStructureEquals()
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
14
    {
15
        $array = (new JsonSerializableMixedResourcesStub)->jsonSerialize();
16
17
        $this->assertArrayStructureEquals([
18
            'foo',
19
            'baz'    => ['*' => ['bar' => ['*'], 'foo']],
20
            'bars'   => ['*' => ['bar', 'foo']],
21
            'foobar' => ['foobar_foo', 'foobar_bar'],
22
        ], $array);
23
    }
24
}
25