public function testGetCurrentScope() { $manager = new Manager(); $resource = new Item(array('name' => 'Larry Ullman'), function () { }); $scope = new Scope($manager, $resource, 'book'); $this->assertEquals('book', $scope->getCurrentScope()); $childScope = $scope->embedChildScope('author', $resource); $this->assertEquals('author', $childScope->getCurrentScope()); $grandChildScope = $childScope->embedChildScope('profile', $resource); $this->assertEquals('profile', $grandChildScope->getCurrentScope()); }