Example #1
0
 public function testNullScope()
 {
     $s = new Scope(null);
     $this->assertFalse($s->hasScope(new Scope("foo")));
     $this->assertTrue($s->hasScope(new Scope(array())));
     $this->assertTrue($s->hasScope(new Scope()));
     $this->assertTrue($s->hasScope(new Scope(array())));
 }
Example #2
0
 public function testEmptyScope()
 {
     $s = new Scope();
     $this->assertTrue($s->isEmpty());
     $this->assertTrue($s->equals(new Scope()));
     $this->assertFalse($s->hasScope(new Scope(array("foo"))));
     $this->assertTrue($s->hasScope(new Scope()));
     $this->assertTrue($s->hasAnyScope(new Scope()));
 }