Skip to content

Commit 26b73d8

Browse files
committed
消除单元测试中的警告
PHPUnit 9.6.9 by Sebastian Bergmann and contributors. Warning: Abstract test case classes with "Test" suffix are deprecated (tests\BaseTest)
1 parent 52c755a commit 26b73d8

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

tests/BaseTest.php renamed to tests/Base.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
use PHPUnit\Framework\TestCase;
66

7-
abstract class BaseTest extends TestCase {
7+
abstract class Base extends TestCase {
88
static $ROOT_PATH = __DIR__ . "/../vendor/topthink/think";
99
static $RUNTIME_PATH = __DIR__ . "/../runtime/";
1010

tests/CustomCacheTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public function has(string $key): bool { return true; }
4646
}
4747

4848

49-
class CustomCacheTest extends BaseTest {
49+
class CustomCacheTest extends Base {
5050

5151
function visit(int $count): int
5252
{

tests/ResidentMemoryTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* Class ResidentMemoryTest
1111
* @package tests
1212
*/
13-
class ResidentMemoryTest extends BaseTest
13+
class ResidentMemoryTest extends Base
1414
{
1515
public function test_resident_memory()
1616
{

tests/ThrottleDefaultConfigTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* Class ThrottleDefaultConfig
99
* @package tests
1010
*/
11-
class ThrottleDefaultConfigTest extends BaseTest
11+
class ThrottleDefaultConfigTest extends Base
1212
{
1313
function __construct($name = null, array $data = [], $dataName = '')
1414
{

tests/VisitRateTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
use think\middleware\Throttle;
1010

11-
class VisitRateTest extends BaseTest
11+
class VisitRateTest extends Base
1212
{
1313
function is_visit_allow(string $uri): bool
1414
{

0 commit comments

Comments
 (0)