Code Duplication    Length = 15-15 lines in 2 locations

test/ScopeTest.php 2 locations

@@ 496-510 (lines=15) @@
493
        $this->assertSame($expected, $scope->toArray());
494
    }
495
496
    public function fieldsetsWithMandatorySerializerFieldsProvider()
497
    {
498
        return [
499
            //Don't request for mandatory field
500
            [
501
                ['resourceName' => 'baz'],
502
                ['data' => ['foo' => 'bar', 'baz' => 'qux']]
503
            ],
504
            //Request required field anyway
505
            [
506
                ['resourceName' => 'foo,baz'],
507
                ['data' => ['foo' => 'bar', 'baz' => 'qux']]
508
            ]
509
        ];
510
    }
511
512
    /**
513
     * @dataProvider fieldsetsWithIncludesProvider
@@ 533-547 (lines=15) @@
530
        $this->assertSame($expected, $scope->toArray());
531
    }
532
533
    public function fieldsetsWithIncludesProvider()
534
    {
535
        return [
536
            //Included relation was not requested
537
            [
538
                ['resourceName' => 'foo'],
539
                ['data' => ['foo' => 'bar']]
540
            ],
541
            //Included relation was requested
542
            [
543
                ['resourceName' => 'foo,book', 'book' => 'yin'],
544
                ['data' => ['foo' => 'bar', 'book' => ['yin' => 'yang']]]
545
            ]
546
        ];
547
    }
548
549
    /**
550
     * @covers League\Fractal\Scope::toArray