CakeDC\Users\Test\TestCase\Controller\Traits\SocialTraitTest::testSocialEmailInvalid PHP Метод

testSocialEmailInvalid() публичный Метод

Test socialEmail
    public function testSocialEmailInvalid()
    {
        $session = $this->getMockBuilder('Cake\\Network\\Session')->setMethods(['check'])->getMock();
        $session->expects($this->once())->method('check')->with('Users.social')->will($this->returnValue(null));
        $this->controller->Trait->request = $this->getMockBuilder('Cake\\Network\\Request')->setMethods(['session'])->getMock();
        $this->controller->Trait->request->expects($this->once())->method('session')->will($this->returnValue($session));
        $this->controller->Trait->socialEmail();
    }