Code Duplication    Length = 15-17 lines in 2 locations

test/ScopeTest.php 2 locations

@@ 585-601 (lines=17) @@
582
        $this->assertSame($expected, $scope->toArray());
583
    }
584
585
    public function fieldsetsProvider()
586
    {
587
        return [
588
            [
589
                ['resourceName' => 'foo'],
590
                ['data' => ['foo' => 'bar']]
591
            ],
592
            [
593
                ['resourceName' => 'foo,baz'],
594
                ['data' => ['foo' => 'bar', 'baz' => 'qux']]
595
            ],
596
            [
597
                ['resourceName' => 'inexistentField'],
598
                ['data' => []]
599
            ]
600
        ];
601
    }
602
603
    /**
604
     * @covers \League\Fractal\Scope::toArray
@@ 714-728 (lines=15) @@
711
        $this->assertSame($expected, $scope->toArray());
712
    }
713
714
    public function fieldsetsWithSideLoadIncludesProvider()
715
    {
716
        return [
717
            //Included relation was not requested
718
            [
719
                ['resourceName' => 'foo'],
720
                ['data' => ['foo' => 'bar']]
721
            ],
722
            //Included relation was requested
723
            [
724
                ['resourceName' => 'foo,book', 'book' => 'yin'],
725
                ['data' => ['foo' => 'bar'], 'sideloaded' => ['book' => ['yin' => 'yang']]]
726
            ]
727
        ];
728
    }
729
730
    public function tearDown()
731
    {