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