Code Duplication    Length = 15-17 lines in 2 locations

test/ScopeTest.php 2 locations

@@ 453-469 (lines=17) @@
450
        $this->assertSame($expected, $scope->toArray());
451
    }
452
453
    public function fieldsetsProvider()
454
    {
455
        return [
456
            [
457
                ['resourceName' => 'foo'],
458
                ['data' => ['foo' => 'bar']]
459
            ],
460
            [
461
                ['resourceName' => 'foo,baz'],
462
                ['data' => ['foo' => 'bar', 'baz' => 'qux']]
463
            ],
464
            [
465
                ['resourceName' => 'inexistentField'],
466
                ['data' => []]
467
            ]
468
        ];
469
    }
470
471
    /**
472
     * @covers League\Fractal\Scope::toArray
@@ 582-596 (lines=15) @@
579
        $this->assertSame($expected, $scope->toArray());
580
    }
581
582
    public function fieldsetsWithSideLoadIncludesProvider()
583
    {
584
        return [
585
            //Included relation was not requested
586
            [
587
                ['resourceName' => 'foo'],
588
                ['data' => ['foo' => 'bar']]
589
            ],
590
            //Included relation was requested
591
            [
592
                ['resourceName' => 'foo,book', 'book' => 'yin'],
593
                ['data' => ['foo' => 'bar'], 'sideloaded' => ['book' => ['yin' => 'yang']]]
594
            ]
595
        ];
596
    }
597
598
    public function tearDown()
599
    {