suyuan-breed/vendor/aliyuncs/oss-sdk-php/tests/OSS/Tests/HeaderResultTest.php

24 lines
561 B
PHP
Raw Normal View History

2024-01-09 15:59:23 +08:00
<?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');
}
}