public function testSetTwoFactorAuthHelper() { $twoFactorHelperStub = $this->getMock('\\pmill\\Auth\\Interfaces\\TwoFactorAuthenticationHelper'); $twoFactorHelperStub->method('required')->willReturn(true); $twoFactorHelperStub->method('verify')->willReturn(true); $auth = new \pmill\Auth\Authenticate(); $auth->setTwoFactorAuthHelper($twoFactorHelperStub); $this->assertInstanceOf('\\pmill\\Auth\\Interfaces\\TwoFactorAuthenticationHelper', $auth->getTwoFactorAuthHelper()); }