public function getSession()
{
return $this->request->getSession();
}
/** * @test */ public function getSession_objectInitialized_returnSession() { //Mock the Request object $session = $this->getMock("Symfony\\Component\\HttpFoundation\\Session\\SessionInterface"); $this->request->expects($this->once())->method('getSession')->will($this->returnValue($session)); $returnValue = $this->authContext->getSession(); $this->assertEquals($session, $returnValue); }