Code Duplication    Length = 15-17 lines in 2 locations

test/ScopeTest.php 2 locations

@@ 568-584 (lines=17) @@
565
        $this->assertSame($expected, $scope->toArray());
566
    }
567
568
    public function fieldsetsProvider()
569
    {
570
        return [
571
            [
572
                ['resourceName' => 'foo'],
573
                ['data' => ['foo' => 'bar']]
574
            ],
575
            [
576
                ['resourceName' => 'foo,baz'],
577
                ['data' => ['foo' => 'bar', 'baz' => 'qux']]
578
            ],
579
            [
580
                ['resourceName' => 'inexistentField'],
581
                ['data' => []]
582
            ]
583
        ];
584
    }
585
586
    /**
587
     * @covers \League\Fractal\Scope::toArray
@@ 697-711 (lines=15) @@
694
        $this->assertSame($expected, $scope->toArray());
695
    }
696
697
    public function fieldsetsWithSideLoadIncludesProvider()
698
    {
699
        return [
700
            //Included relation was not requested
701
            [
702
                ['resourceName' => 'foo'],
703
                ['data' => ['foo' => 'bar']]
704
            ],
705
            //Included relation was requested
706
            [
707
                ['resourceName' => 'foo,book', 'book' => 'yin'],
708
                ['data' => ['foo' => 'bar'], 'sideloaded' => ['book' => ['yin' => 'yang']]]
709
            ]
710
        ];
711
    }
712
713
    public function tearDown()
714
    {