Skip to content

Commit 657fb08

Browse files
committed
test: fix assertion
The number of tables may vary.
1 parent 7595358 commit 657fb08

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/system/Commands/Database/ShowTableInfoMockIOTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@ public function testDbTableWithInputs(): void
5656

5757
$result = $io->getOutput();
5858

59-
$expected = 'Which table do you want to see? [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]: a
60-
The Which table do you want to see? field must be one of: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9.';
61-
$this->assertStringContainsString($expected, $result);
59+
$expectedPattern = '/Which table do you want to see\? \[0, 1, 2, 3, 4, 5, 6, 7, 8, 9.*?\]: a
60+
The Which table do you want to see\? field must be one of: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9.*?./';
61+
$this->assertMatchesRegularExpression($expectedPattern, $result);
6262

6363
$expected = 'Data of Table "db_migrations":';
6464
$this->assertStringContainsString($expected, $result);

0 commit comments

Comments
 (0)