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

24 lines
561 B
PHP
Raw Permalink Normal View History

2023-09-26 18:09:46 +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');
}
}