Ejemplo n.º 1
0
 /**
  * @dataProvider requestsProvider
  */
 public function testCurrent($request, $expected, $_2, $_3, $_4)
 {
     $requestStackMock = m::mock('Symfony\\Component\\HttpFoundation\\RequestStack');
     $requestStackMock->shouldReceive('getCurrentRequest')->andReturn($request);
     $this->containerMock->shouldReceive('has')->with('request_stack')->andReturn(true);
     $this->containerMock->shouldReceive('get')->with('request_stack')->andReturn($requestStackMock);
     $returnUrlHelper = new ReturnUrlHelper($this->containerMock);
     $value = $returnUrlHelper->current();
     $this->assertEquals($expected, $value);
 }
Ejemplo n.º 2
0
 /**
  * @return array
  */
 public function getGlobals()
 {
     return array('current_ru' => $this->returnUrlHelper->current(), 'last_ru' => $this->returnUrlHelper->last(), 'current_ru64' => $this->returnUrlHelper->current64(), 'last_ru64' => $this->returnUrlHelper->last64());
 }