Exemplo n.º 1
0
 public function testGetAndSetRequest()
 {
     $this->assertInstanceOf('Zend_Controller_Request_Abstract', $this->_output->getRequest());
     $request = $this->getMock('Zend_Controller_Request_Abstract');
     $this->_output->setRequest($request);
     $this->assertSame($request, $this->_output->getRequest());
 }
Exemplo n.º 2
0
 protected function setUp()
 {
     $this->_response = $this->getMockBuilder('\\Magento\\Framework\\App\\Response\\Http')->setMethods(array('canSendHeaders', 'sendHeaders'))->disableOriginalConstructor()->getMock();
     $this->_response->expects($this->any())->method('canSendHeaders')->will($this->returnValue(true));
     $this->_request = $this->getMock('\\Magento\\Framework\\App\\Request\\Http', array('getHeader'), array(), '', false);
     $this->_request->expects($this->any())->method('getHeader')->with('User-Agent')->will($this->returnValue('Mozilla/5.0 with FirePHP/1.6'));
     $this->_output = new \Magento\Framework\Profiler\Driver\Standard\Output\Firebug();
     $this->_output->setResponse($this->_response);
     $this->_output->setRequest($this->_request);
 }
Exemplo n.º 3
0
 protected function setUp()
 {
     $this->markTestSkipped('Remove it when MAGETWO-33495 is done.');
     $this->_response = $this->getMockBuilder('\\Magento\\Framework\\App\\Response\\Http')->setMethods(['sendHeaders'])->disableOriginalConstructor()->getMock();
     $this->_request = $this->getMock('\\Magento\\Framework\\App\\Request\\Http', ['getHeader'], [], '', false);
     $header = \Zend\Http\Header\GenericHeader::fromString('User-Agent: Mozilla/5.0 FirePHP/1.6');
     $this->_request->expects($this->any())->method('getHeader')->with('User-Agent')->will($this->returnValue($header));
     $this->_output = new \Magento\Framework\Profiler\Driver\Standard\Output\Firebug();
     $this->_output->setResponse($this->_response);
     $this->_output->setRequest($this->_request);
 }