示例#1
0
 public function testCheckScope()
 {
     $scopeUtil = new Scope();
     $this->assertFalse($scopeUtil->checkScope('invalid', 'list of scopes'));
     $this->assertTrue($scopeUtil->checkScope('valid', 'valid and-some other-scopes'));
     $this->assertTrue($scopeUtil->checkScope('valid another-valid', 'valid another-valid and-some other-scopes'));
     // all scopes must match
     $this->assertFalse($scopeUtil->checkScope('valid invalid', 'valid and-some other-scopes'));
     $this->assertFalse($scopeUtil->checkScope('valid valid2 invalid', 'valid valid2 and-some other-scopes'));
 }