isAccessible() public method

Tells if this node may be accessed according to the current security context.
public isAccessible ( ) : boolean
return boolean
 /**
  * @test
  */
 public function isAccessibleReturnsTrueIfRoleIsEveryone()
 {
     /** @var SecurityContext|\PHPUnit_Framework_MockObject_MockObject $mockSecurityContext */
     $mockSecurityContext = $this->createMock(SecurityContext::class);
     $mockSecurityContext->expects($this->at(0))->method('canBeInitialized')->will($this->returnValue(true));
     $mockSecurityContext->expects($this->at(1))->method('hasRole')->with('SomeRole')->will($this->returnValue(false));
     $mockSecurityContext->expects($this->at(2))->method('hasRole')->with('Everyone')->will($this->returnValue(true));
     $this->inject($this->nodeData, 'securityContext', $mockSecurityContext);
     $this->nodeData->setAccessRoles(array('SomeRole', 'Everyone', 'SomeOtherRole'));
     $this->assertTrue($this->nodeData->isAccessible());
 }
 /**
  * Tells if this node may be accessed according to the current security context.
  *
  * @return boolean
  * @api
  */
 public function isAccessible()
 {
     return $this->nodeData->isAccessible();
 }