CakeDC\Users\Test\TestCase\Controller\Component\UsersAuthComponentTest::testIsUrlAuthorizedUserNotLoggedInActionAllowed PHP Method

testIsUrlAuthorizedUserNotLoggedInActionAllowed() public method

test The user is not logged in, but the controller action is public $this->Auth->allow()
    public function testIsUrlAuthorizedUserNotLoggedInActionAllowed()
    {
        $event = new Event('event');
        $event->data = ['url' => '/route'];
        $this->Controller->Auth = $this->getMockBuilder('Cake\\Controller\\Component\\AuthComponent')->setMethods(['user', 'isAuthorized'])->disableOriginalConstructor()->getMock();
        $this->Controller->Auth->allowedActions = ['requestResetPassword'];
        $this->Controller->Auth->expects($this->never())->method('user');
        $result = $this->Controller->UsersAuth->isUrlAuthorized($event);
        $this->assertTrue($result);
    }