Пример #1
0
 public function testPushParentScope()
 {
     $manager = new Manager();
     $resource = new Item(array('name' => 'Larry Ullman'), function () {
     });
     $scope = new Scope($manager, $resource);
     $this->assertEquals(1, $scope->pushParentScope('book'));
     $this->assertEquals(2, $scope->pushParentScope('author'));
     $this->assertEquals(3, $scope->pushParentScope('profile'));
     $this->assertEquals(array('book', 'author', 'profile'), $scope->getParentScopes());
 }