|
@@ 54-60 (lines=7) @@
|
| 51 |
|
/** |
| 52 |
|
* @covers League\Fractal\TransformerAbstract::setCurrentScope |
| 53 |
|
*/ |
| 54 |
|
public function testSetCurrentScope() |
| 55 |
|
{ |
| 56 |
|
$transformer = $this->getMockForAbstractClass('League\Fractal\TransformerAbstract'); |
| 57 |
|
$manager = new Manager(); |
| 58 |
|
$scope = new Scope($manager, m::mock('League\Fractal\Resource\ResourceAbstract')); |
| 59 |
|
$this->assertInstanceOf('League\Fractal\TransformerAbstract', $transformer->setCurrentScope($scope)); |
| 60 |
|
} |
| 61 |
|
|
| 62 |
|
/** |
| 63 |
|
* @covers League\Fractal\TransformerAbstract::getCurrentScope |
|
@@ 65-72 (lines=8) @@
|
| 62 |
|
/** |
| 63 |
|
* @covers League\Fractal\TransformerAbstract::getCurrentScope |
| 64 |
|
*/ |
| 65 |
|
public function testGetCurrentScope() |
| 66 |
|
{ |
| 67 |
|
$transformer = m::mock('League\Fractal\TransformerAbstract')->makePartial(); |
| 68 |
|
$manager = new Manager(); |
| 69 |
|
$scope = new Scope($manager, m::mock('League\Fractal\Resource\ResourceAbstract')); |
| 70 |
|
$transformer->setCurrentScope($scope); |
| 71 |
|
$this->assertSame($transformer->getCurrentScope(), $scope); |
| 72 |
|
} |
| 73 |
|
|
| 74 |
|
public function testProcessEmbeddedResourcesNoAvailableIncludes() |
| 75 |
|
{ |