/** * Test description. * * @return void */ public function testSession() { $browser = m::mock(self::BROWSER_CLASS); $session1 = m::mock(self::SESSION_CLASS); $session2 = m::mock(self::SESSION_CLASS); $this->_factory->shouldReceive('createSession')->with($browser)->twice()->andReturn($session1, $session2); $this->assertEquals($session1, $this->strategy->session($browser)); $this->assertEquals($session2, $this->strategy->session($browser)); }