You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
yanzong/vendor/aliyuncs/oss-sdk-php/tests/OSS/Tests/HeaderResultTest.php

23 lines
561 B

<?php
namespace OSS\Tests;
use OSS\Result\HeaderResult;
use OSS\Http\ResponseCore;
/**
* Class HeaderResultTest
* @package OSS\Tests
*/
class HeaderResultTest extends \PHPUnit\Framework\TestCase
{
public function testGetHeader()
{
$response = new ResponseCore(array('key' => 'value'), "", 200);
$result = new HeaderResult($response);
$this->assertTrue($result->isOK());
$this->assertTrue(is_array($result->getData()));
$data = $result->getData();
$this->assertEquals($data['key'], 'value');
}
}