HeaderResultTest.php 584 B

1234567891011121314151617181920212223
  1. <?php
  2. namespace OSS\Tests;
  3. use OSS\Result\HeaderResult;
  4. use OSS\Http\ResponseCore;
  5. /**
  6. * Class HeaderResultTest
  7. * @package OSS\Tests
  8. */
  9. class HeaderResultTest extends \PHPUnit_Framework_TestCase
  10. {
  11. public function testGetHeader()
  12. {
  13. $response = new ResponseCore(array('key' => 'value'), "", 200);
  14. $result = new HeaderResult($response);
  15. $this->assertTrue($result->isOK());
  16. $this->assertTrue(is_array($result->getData()));
  17. $data = $result->getData();
  18. $this->assertEquals($data['key'], 'value');
  19. }
  20. }