@@ 32-40 (lines=9) @@ | ||
29 | $this->assertInstanceOf('League\Fractal\Scope', $childScope); |
|
30 | } |
|
31 | ||
32 | public function testGetManager() |
|
33 | { |
|
34 | $resource = new Item(['foo' => 'bar'], function () { |
|
35 | }); |
|
36 | ||
37 | $scope = new Scope(new Manager(), $resource, 'book'); |
|
38 | ||
39 | $this->assertInstanceOf('League\Fractal\Manager', $scope->getManager()); |
|
40 | } |
|
41 | ||
42 | public function testGetResource() |
|
43 | { |
|
@@ 42-51 (lines=10) @@ | ||
39 | $this->assertInstanceOf('League\Fractal\Manager', $scope->getManager()); |
|
40 | } |
|
41 | ||
42 | public function testGetResource() |
|
43 | { |
|
44 | $resource = new Item(['foo' => 'bar'], function () { |
|
45 | }); |
|
46 | ||
47 | $scope = new Scope(new Manager(), $resource, 'book'); |
|
48 | ||
49 | $this->assertInstanceOf('League\Fractal\Resource\ResourceAbstract', $scope->getResource()); |
|
50 | $this->assertInstanceOf('League\Fractal\Resource\Item', $scope->getResource()); |
|
51 | } |
|
52 | ||
53 | /** |
|
54 | * @covers League\Fractal\Scope::toArray |