Code Duplication    Length = 15-15 lines in 2 locations

test/ScopeTest.php 2 locations

@@ 628-642 (lines=15) @@
625
        $this->assertSame($expected, $scope->toArray());
626
    }
627
628
    public function fieldsetsWithMandatorySerializerFieldsProvider()
629
    {
630
        return [
631
            //Don't request for mandatory field
632
            [
633
                ['resourceName' => 'baz'],
634
                ['data' => ['foo' => 'bar', 'baz' => 'qux']]
635
            ],
636
            //Request required field anyway
637
            [
638
                ['resourceName' => 'foo,baz'],
639
                ['data' => ['foo' => 'bar', 'baz' => 'qux']]
640
            ]
641
        ];
642
    }
643
644
    /**
645
     * @dataProvider fieldsetsWithIncludesProvider
@@ 665-679 (lines=15) @@
662
        $this->assertSame($expected, $scope->toArray());
663
    }
664
665
    public function fieldsetsWithIncludesProvider()
666
    {
667
        return [
668
            //Included relation was not requested
669
            [
670
                ['resourceName' => 'foo'],
671
                ['data' => ['foo' => 'bar']]
672
            ],
673
            //Included relation was requested
674
            [
675
                ['resourceName' => 'foo,book', 'book' => 'yin'],
676
                ['data' => ['foo' => 'bar', 'book' => ['yin' => 'yang']]]
677
            ]
678
        ];
679
    }
680
681
    /**
682
     * @covers \League\Fractal\Scope::toArray