CakeDC\Users\Test\TestCase\Controller\Traits\LoginTraitTest::testLoginBeforeLoginReturningStoppedEvent PHP Method

testLoginBeforeLoginReturningStoppedEvent() public method

test
    public function testLoginBeforeLoginReturningStoppedEvent()
    {
        $event = new Event('event');
        $event->result = '/';
        $event->stopPropagation();
        $this->Trait->expects($this->at(0))->method('dispatchEvent')->with(UsersAuthComponent::EVENT_BEFORE_LOGIN)->will($this->returnValue($event));
        $this->Trait->expects($this->once())->method('redirect')->with('/');
        $this->Trait->login();
    }