Exemplo n.º 1
0
 /**
  * @covers Mage_Selenium_TestCase::getHttpResponse
  */
 public function testGetHttpResponse()
 {
     $instance = new Mage_Selenium_TestCase();
     $response = $instance->getHttpResponse('http://www.w3.org/');
     $this->assertInternalType('array', $response);
     $this->assertArrayHasKey('http_code', $response);
     $this->assertInternalType('int', $response['http_code']);
     $this->assertEquals(200, $response['http_code']);
     $response = $instance->getHttpResponse('http://foo.nowhere/');
     $this->assertInternalType('array', $response);
     $this->assertArrayHasKey('http_code', $response);
     $this->assertEquals(0, $response['http_code']);
     $response = $instance->getHttpResponse('wikipedia.org');
     $this->assertArrayHasKey('http_code', $response);
     $this->assertEquals(301, $response['http_code']);
 }