Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit dace083

Browse files
authored
Use better autoloading for test files (async-aws#229)
* Use better autoloading for test files * CS * Dont use alias * improvements * cs * Update branch alias * [S3] Update core version
1 parent 8b92922 commit dace083

4 files changed

Lines changed: 21 additions & 13 deletions

File tree

src/Core/Test/InternalTestCase.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?php
2+
3+
namespace AsyncAws\Core\Test;
4+
5+
/**
6+
* Because AsyncAws use symfony/phpunit-bridge and don't requires phpunit/phpunit,
7+
* this class may not exits but is required by the generator and static analyzer tools.
8+
*
9+
* @internal use AsyncAws\Core\Test\TestCase instead
10+
*/
11+
class InternalTestCase
12+
{
13+
public static function assertEqualsCanonicalizing($expected, $actual, string $message = ''): void
14+
{
15+
}
16+
}

src/Core/Test/TestCase.php

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,6 @@ public static function assertHttpFormEqualsHttpForm(string $expected, string $ac
1717
self::assertEqualsCanonicalizing($expectedArray, $actualArray, $message);
1818
}
1919
}
20-
21-
// Because AsyncAws use symfony/phpunit-bridge and don't requires phpunit/phpunit, this class may not exits but is required by the generator and static analyzer tools
2220
if (!\class_exists(PHPUnitTestCase::class)) {
23-
class DummyTestCase
24-
{
25-
public static function assertEqualsCanonicalizing($expected, $actual, string $message = ''): void
26-
{
27-
}
28-
}
29-
\class_alias(DummyTestCase::class, PHPUnitTestCase::class);
21+
\class_alias(InternalTestCase::class, PHPUnitTestCase::class);
3022
}

src/S3/composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@
1010
"require": {
1111
"php": "^7.2.5",
1212
"ext-SimpleXML": "*",
13-
"async-aws/core": "^0.2",
13+
"async-aws/core": "^0.3",
1414
"symfony/http-client-contracts": "^1.0 || ^2.0"
1515
},
1616
"extra": {
1717
"branch-alias": {
18-
"dev-master": "0.1-dev"
18+
"dev-master": "0.2-dev"
1919
}
2020
},
2121
"autoload": {

src/Ses/composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@
1010
"require": {
1111
"php": "^7.2.5",
1212
"ext-SimpleXML": "*",
13-
"async-aws/core": "^0.2",
13+
"async-aws/core": "^0.3",
1414
"symfony/http-client-contracts": "^1.0 || ^2.0"
1515
},
1616
"extra": {
1717
"branch-alias": {
18-
"dev-master": "0.1-dev"
18+
"dev-master": "0.2-dev"
1919
}
2020
},
2121
"autoload": {

0 commit comments

Comments
 (0)