/**
  * Sets up the fixture, for example, opens a network connection.
  * This method is called before a test is executed.
  */
 protected function setUp()
 {
     $this->acl = new Acl();
     $dom = new \DOMDocument();
     $dom->validateOnParse = true;
     $dom->load(__DIR__ . '/fixtures/test.xml', LIBXML_NONET | (defined('LIBXML_COMPACT') ? LIBXML_COMPACT : 0));
     $this->object = new RuleBuilder($dom, $this->acl);
     $roleBuilder = new RoleBuilder($dom, $this->acl);
     $roleBuilder->build();
     $resourceBuilder = new ResourceBuilder($dom, $this->acl);
     $resourceBuilder->build();
 }
 public function testBuildItemWillAddRolesToAcl()
 {
     $this->assertFalse($this->acl->hasRole('guest'));
     $this->assertTrue($this->object->buildItem());
     $this->assertTrue($this->acl->hasRole('guest'));
 }