Skip to content

Commit d8c37a2

Browse files
committed
Compatible with high version phpunit.
1 parent 6381407 commit d8c37a2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+114
-99
lines changed

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
"php":">=5.3"
1515
},
1616
"require-dev" : {
17-
"phpunit/phpunit": "~4.0",
18-
"satooshi/php-coveralls": "~1.0"
17+
"phpunit/phpunit": "*",
18+
"satooshi/php-coveralls": "*"
1919
},
2020
"minimum-stability": "stable",
2121
"autoload": {

tests/OSS/Tests/AclResultTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
use OSS\Core\OssException;
77
use OSS\Http\ResponseCore;
88

9-
class AclResultTest extends \PHPUnit_Framework_TestCase
9+
class AclResultTest extends \PHPUnit\Framework\TestCase
1010
{
1111

1212
private $validXml = <<<BBBB

tests/OSS/Tests/BodyResultTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
use OSS\Result\BodyResult;
77

88

9-
class BodyResultTest extends \PHPUnit_Framework_TestCase
9+
class BodyResultTest extends \PHPUnit\Framework\TestCase
1010
{
1111
public function testParseValid200()
1212
{

tests/OSS/Tests/BucketCnameTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,19 @@
66

77
use OSS\Model\CnameConfig;
88

9-
class BucketCnameTest extends \PHPUnit_Framework_TestCase
9+
class BucketCnameTest extends \PHPUnit\Framework\TestCase
1010
{
1111
private $bucketName;
1212
private $client;
1313

14-
public function setUp()
14+
protected function setUp(): void
1515
{
1616
$this->client = Common::getOssClient();
1717
$this->bucketName = 'php-sdk-test-bucket-' . strval(rand(0, 10000));
1818
$this->client->createBucket($this->bucketName);
1919
}
2020

21-
public function tearDown()
21+
protected function tearDown(): void
2222
{
2323
$this->client->deleteBucket($this->bucketName);
2424
}

tests/OSS/Tests/BucketInfoTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* Class BucketInfoTest
99
* @package OSS\Tests
1010
*/
11-
class BucketInfoTest extends \PHPUnit_Framework_TestCase
11+
class BucketInfoTest extends \PHPUnit\Framework\TestCase
1212
{
1313
public function testConstruct()
1414
{

tests/OSS/Tests/BucketLiveChannelTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,20 @@
77
use OSS\Model\LiveChannelConfig;
88
use OSS\Core\OssException;
99

10-
class BucketLiveChannelTest extends \PHPUnit_Framework_TestCase
10+
class BucketLiveChannelTest extends \PHPUnit\Framework\TestCase
1111
{
1212
private $bucketName;
1313
private $client;
1414

15-
public function setUp()
15+
protected function setUp(): void
1616
{
1717
$this->client = Common::getOssClient();
1818
$this->bucketName = 'php-sdk-test-rtmp-bucket-name-' . strval(rand(0, 10000));
1919
$this->client->createBucket($this->bucketName);
2020
Common::waitMetaSync();
2121
}
2222

23-
public function tearDown()
23+
protected function tearDown(): void
2424
{
2525
////to delete created bucket
2626
//1. delele live channel

tests/OSS/Tests/CallbackTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ private function putObjectCallbackFailed($options, $status)
289289
}
290290
}
291291

292-
public function setUp()
292+
protected function setUp(): void
293293
{
294294
parent::setUp();
295295
}

tests/OSS/Tests/CnameConfigTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
use OSS\Model\CnameConfig;
77
use OSS\Core\OssException;
88

9-
class CnameConfigTest extends \PHPUnit_Framework_TestCase
9+
class CnameConfigTest extends \PHPUnit\Framework\TestCase
1010
{
1111
private $xml1 = <<<BBBB
1212
<?xml version="1.0" encoding="utf-8"?>

tests/OSS/Tests/CopyObjectResult.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
use OSS\Http\ResponseCore;
77
use OSS\Result\CopyObjectResult;
88

9-
class CopyObjectResultTest extends \PHPUnit_Framework_TestCase
9+
class CopyObjectResultTest extends \PHPUnit\Framework\TestCase
1010
{
1111
private $body = <<<BBBB
1212
<?xml version="1.0" encoding="utf-8"?>
@@ -45,7 +45,7 @@ public function testFailResponse()
4545
new CopyObjectResult($response);
4646
$this->assertFalse(true);
4747
} catch (OssException $e) {
48-
48+
$this->assertFalse(false);
4949
}
5050
}
5151

tests/OSS/Tests/CorsConfigTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
use OSS\Model\CorsRule;
88
use OSS\Core\OssException;
99

10-
class CorsConfigTest extends \PHPUnit_Framework_TestCase
10+
class CorsConfigTest extends \PHPUnit\Framework\TestCase
1111
{
1212
private $validXml = <<<BBBB
1313
<?xml version="1.0" encoding="utf-8"?>

0 commit comments

Comments
 (0)