Skip to content

Commit 98d1445

Browse files
authored
Use better autoloading for test files (#229)
* Use better autoloading for test files * CS * Dont use alias * improvements * cs * Update branch alias * [S3] Update core version
1 parent 23157f7 commit 98d1445

File tree

2 files changed

+17
-9
lines changed

2 files changed

+17
-9
lines changed

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+
}

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
}

0 commit comments

Comments
 (0)