File tree Expand file tree Collapse file tree
tests/system/Commands/Database Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -149,4 +149,24 @@ public function testDbTableLimitFieldValueLength(): void
149149 EOL;
150150 $ this ->assertStringContainsString ($ expected , $ result );
151151 }
152+
153+ public function testDbTableLimitRows (): void
154+ {
155+ command ('db:table db_user --limit-rows 2 ' );
156+
157+ $ result = $ this ->getResultWithoutControlCode ();
158+
159+ $ expected = 'Data of Table "db_user": ' ;
160+ $ this ->assertStringContainsString ($ expected , $ result );
161+
162+ $ expected = <<<'EOL'
163+ +----+-------------+--------------------+---------+------------+------------+------------+
164+ | id | name | email | country | created_at | updated_at | deleted_at |
165+ +----+-------------+--------------------+---------+------------+------------+------------+
166+ | 1 | Derek Jones | derek@world.com | US | | | |
167+ | 2 | Ahmadinejad | ahmadinejad@wor... | Iran | | | |
168+ +----+-------------+--------------------+---------+------------+------------+------------+
169+ EOL;
170+ $ this ->assertStringContainsString ($ expected , $ result );
171+ }
152172}
You can’t perform that action at this time.
0 commit comments