From 368036017470c53460db6794b212fa28665cd172 Mon Sep 17 00:00:00 2001 From: kenjis Date: Mon, 25 Sep 2023 12:59:07 +0900 Subject: [PATCH] test: fix assertion --- tests/system/Commands/Database/ShowTableInfoTest.php | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/tests/system/Commands/Database/ShowTableInfoTest.php b/tests/system/Commands/Database/ShowTableInfoTest.php index 718cb1e9d827..9b54ff2acf9e 100644 --- a/tests/system/Commands/Database/ShowTableInfoTest.php +++ b/tests/system/Commands/Database/ShowTableInfoTest.php @@ -70,12 +70,8 @@ public function testDbTableShowsDBConfig(): void $result = $this->getNormalizedResult(); - $expected = <<<'EOL' - +-----------+----------+----------+----------+----------+------+ - | hostname | database | username | DBDriver | DBPrefix | port | - +-----------+----------+----------+----------+----------+------+ - EOL; - $this->assertStringContainsString($expected, $result); + $expectedPattern = '/\| hostname[[:blank:]]+\| database[[:blank:]]+\| username[[:blank:]]+\| DBDriver[[:blank:]]+\| DBPrefix[[:blank:]]+\| port[[:blank:]]+\|/'; + $this->assertMatchesRegularExpression($expectedPattern, $result); } public function testDbTableShow(): void