@@ -64,11 +64,11 @@ public function testDbTable(): void
64
64
$ expected = 'Data of Table "db_migrations": ' ;
65
65
$ this ->assertStringContainsString ($ expected , $ result );
66
66
67
- $ expected = <<<'EOL'
68
- +----+----------------+--------------------+-------+---------------+------------+-------+
69
- | id | version | class | group | namespace | time | batch |
70
- +----+----------------+--------------------+-------+---------------+------------+-------+
71
- EOL ;
67
+ $ expected = implode ( PHP_EOL , [
68
+ ' +----+----------------+--------------------+-------+---------------+------------+-------+ ' ,
69
+ ' | id | version | class | group | namespace | time | batch | ' ,
70
+ ' +----+----------------+--------------------+-------+---------------+------------+-------+ ' ,
71
+ ]) ;
72
72
$ this ->assertStringContainsString ($ expected , $ result );
73
73
}
74
74
@@ -81,11 +81,11 @@ public function testDbTableShow(): void
81
81
$ expected = 'The following is a list of the names of all database tables: ' ;
82
82
$ this ->assertStringContainsString ($ expected , $ result );
83
83
84
- $ expected = <<<'EOL'
85
- +----+---------------------------+-------------+---------------+
86
- | ID | Table Name | Num of Rows | Num of Fields |
87
- +----+---------------------------+-------------+---------------+
88
- EOL ;
84
+ $ expected = implode ( PHP_EOL , [
85
+ ' +----+---------------------------+-------------+---------------+ ' ,
86
+ ' | ID | Table Name | Num of Rows | Num of Fields | ' ,
87
+ ' +----+---------------------------+-------------+---------------+ ' ,
88
+ ]) ;
89
89
$ this ->assertStringContainsString ($ expected , $ result );
90
90
}
91
91
@@ -99,9 +99,7 @@ public function testDbTableMetadata(): void
99
99
$ this ->assertStringContainsString ($ expected , $ result );
100
100
101
101
$ result = preg_replace ('/\s+/ ' , ' ' , $ result );
102
- $ expected = <<<'EOL'
103
- | Field Name | Type | Max Length | Nullable | Default | Primary Key |
104
- EOL;
102
+ $ expected = '| Field Name | Type | Max Length | Nullable | Default | Primary Key | ' ;
105
103
$ this ->assertStringContainsString ($ expected , $ result );
106
104
}
107
105
@@ -117,16 +115,16 @@ public function testDbTableDesc(): void
117
115
$ expected = 'Data of Table "db_user": ' ;
118
116
$ this ->assertStringContainsString ($ expected , $ result );
119
117
120
- $ expected = <<<'EOL'
121
- +----+--------------------+--------------------+---------+------------+------------+------------+
122
- | id | name | email | country | created_at | updated_at | deleted_at |
123
- +----+--------------------+--------------------+---------+------------+------------+------------+
124
- | 4 | Chris Martin | [email protected] | UK | | | |
125
- | 3 | Richard A Cause... | [email protected] ... | US | | | |
126
- | 2 | Ahmadinejad | ahmadinejad@wor... | Iran | | | |
127
- | 1 | Derek Jones | [email protected] | US | | | |
128
- +----+--------------------+--------------------+---------+------------+------------+------------+
129
- EOL ;
118
+ $ expected = implode ( PHP_EOL , [
119
+ ' +----+--------------------+--------------------+---------+------------+------------+------------+ ' ,
120
+ ' | id | name | email | country | created_at | updated_at | deleted_at | ' ,
121
+ ' +----+--------------------+--------------------+---------+------------+------------+------------+ ' ,
122
+ ' | 4 | Chris Martin | [email protected] | UK | | | | ' ,
123
+ ' | 3 | Richard A Cause... | [email protected] ... | US | | | | ' ,
124
+ ' | 2 | Ahmadinejad | ahmadinejad@wor... | Iran | | | | ' ,
125
+ ' | 1 | Derek Jones | [email protected] | US | | | | ' ,
126
+ ' +----+--------------------+--------------------+---------+------------+------------+------------+ ' ,
127
+ ]) ;
130
128
$ this ->assertStringContainsString ($ expected , $ result );
131
129
}
132
130
@@ -139,16 +137,16 @@ public function testDbTableLimitFieldValueLength(): void
139
137
$ expected = 'Data of Table "db_user": ' ;
140
138
$ this ->assertStringContainsString ($ expected , $ result );
141
139
142
- $ expected = <<<'EOL'
143
- +----+----------+----------+---------+------------+------------+------------+
144
- | id | name | email | country | created_at | updated_at | deleted_at |
145
- +----+----------+----------+---------+------------+------------+------------+
146
- | 1 | Derek... | derek... | US | | | |
147
- | 2 | Ahmad... | ahmad... | Iran | | | |
148
- | 3 | Richa... | richa... | US | | | |
149
- | 4 | Chris... | chris... | UK | | | |
150
- +----+----------+----------+---------+------------+------------+------------+
151
- EOL ;
140
+ $ expected = implode ( PHP_EOL , [
141
+ ' +----+----------+----------+---------+------------+------------+------------+ ' ,
142
+ ' | id | name | email | country | created_at | updated_at | deleted_at | ' ,
143
+ ' +----+----------+----------+---------+------------+------------+------------+ ' ,
144
+ ' | 1 | Derek... | derek... | US | | | | ' ,
145
+ ' | 2 | Ahmad... | ahmad... | Iran | | | | ' ,
146
+ ' | 3 | Richa... | richa... | US | | | | ' ,
147
+ ' | 4 | Chris... | chris... | UK | | | | ' ,
148
+ ' +----+----------+----------+---------+------------+------------+------------+ ' ,
149
+ ]) ;
152
150
$ this ->assertStringContainsString ($ expected , $ result );
153
151
}
154
152
@@ -161,14 +159,14 @@ public function testDbTableLimitRows(): void
161
159
$ expected = 'Data of Table "db_user": ' ;
162
160
$ this ->assertStringContainsString ($ expected , $ result );
163
161
164
- $ expected = <<<'EOL'
165
- +----+-------------+--------------------+---------+------------+------------+------------+
166
- | id | name | email | country | created_at | updated_at | deleted_at |
167
- +----+-------------+--------------------+---------+------------+------------+------------+
168
- | 1 | Derek Jones | [email protected] | US | | | |
169
- | 2 | Ahmadinejad | ahmadinejad@wor... | Iran | | | |
170
- +----+-------------+--------------------+---------+------------+------------+------------+
171
- EOL ;
162
+ $ expected = implode ( PHP_EOL , [
163
+ ' +----+-------------+--------------------+---------+------------+------------+------------+ ' ,
164
+ ' | id | name | email | country | created_at | updated_at | deleted_at | ' ,
165
+ ' +----+-------------+--------------------+---------+------------+------------+------------+ ' ,
166
+ ' | 1 | Derek Jones | [email protected] | US | | | | ' ,
167
+ ' | 2 | Ahmadinejad | ahmadinejad@wor... | Iran | | | | ' ,
168
+ ' +----+-------------+--------------------+---------+------------+------------+------------+ ' ,
169
+ ]) ;
172
170
$ this ->assertStringContainsString ($ expected , $ result );
173
171
}
174
172
@@ -181,14 +179,14 @@ public function testDbTableAllOptions(): void
181
179
$ expected = 'Data of Table "db_user": ' ;
182
180
$ this ->assertStringContainsString ($ expected , $ result );
183
181
184
- $ expected = <<<'EOL'
185
- +----+----------+----------+---------+------------+------------+------------+
186
- | id | name | email | country | created_at | updated_at | deleted_at |
187
- +----+----------+----------+---------+------------+------------+------------+
188
- | 4 | Chris... | chris... | UK | | | |
189
- | 3 | Richa... | richa... | US | | | |
190
- +----+----------+----------+---------+------------+------------+------------+
191
- EOL ;
182
+ $ expected = implode ( PHP_EOL , [
183
+ ' +----+----------+----------+---------+------------+------------+------------+ ' ,
184
+ ' | id | name | email | country | created_at | updated_at | deleted_at | ' ,
185
+ ' +----+----------+----------+---------+------------+------------+------------+ ' ,
186
+ ' | 4 | Chris... | chris... | UK | | | | ' ,
187
+ ' | 3 | Richa... | richa... | US | | | | ' ,
188
+ ' +----+----------+----------+---------+------------+------------+------------+ ' ,
189
+ ]) ;
192
190
$ this ->assertStringContainsString ($ expected , $ result );
193
191
}
194
192
}
0 commit comments