Bolt\Tests\Twig\UserHandlerTest::testIsAllowedObject PHP Method

testIsAllowedObject() public method

public testIsAllowedObject ( )
    public function testIsAllowedObject()
    {
        $app = $this->getApp();
        $handler = new UserHandler($app);
        $users = $this->getMockUsers();
        $users->expects($this->atLeastOnce())->method('isAllowed')->will($this->returnValue(true));
        $app['users'] = $users;
        $content = new \Bolt\Legacy\Content($app, []);
        $result = $handler->isAllowed('koala', $content);
        $this->assertTrue($result);
    }