@@ -185,8 +185,11 @@ public function testAfterKeyword()
185185 $ dbSchema , 'tableName ' , $ columnSchema , false , false
186186 );
187187
188- $ this ->assertStringContainsString ('AFTER username ' , $ column ->getCode ());
189- $ this ->assertStringNotContainsString ('AFTER username ' , $ columnWithoutPreviousCol ->getCode ());
188+ // https://github.com/cebe/yii2-openapi/pull/141/files#diff-d2ab9925cad7eac58e0ff4cc0d251a937ecf49e4b6bf57f8b95aab76648a9d34R33
189+ $ this ->assertSame (strpos ($ column ->getCode (), 'AFTER username ' ), 28 );
190+ // $this->assertStringContainsString('AFTER username', $column->getCode());
191+ // $this->assertStringNotContainsString('AFTER username', $columnWithoutPreviousCol->getCode());
192+ $ this ->assertFalse (strpos ($ columnWithoutPreviousCol ->getCode (), 'AFTER username ' ));
190193
191194 // test `after` for fluent part in function call `after()`
192195 unset($ column , $ columnWithoutPreviousCol );
@@ -198,7 +201,12 @@ public function testAfterKeyword()
198201 $ dbSchema , 'tableName ' , $ columnSchema , true , false
199202 );
200203
201- $ this ->assertStringContainsString ("->after('username') " , $ column ->getCode ());
202- $ this ->assertStringNotContainsString ("->after('username') " , $ columnWithoutPreviousCol ->getCode ());
204+ // https://github.com/cebe/yii2-openapi/pull/141/files#diff-d2ab9925cad7eac58e0ff4cc0d251a937ecf49e4b6bf57f8b95aab76648a9d34R33
205+ // $this->assertStringContainsString("->after('username')", $column->getCode());
206+ $ this ->assertSame (strpos ($ column ->getCode (), "->after('username') " ), 41 );
207+
208+ // https://github.com/cebe/yii2-openapi/pull/141/files#diff-d2ab9925cad7eac58e0ff4cc0d251a937ecf49e4b6bf57f8b95aab76648a9d34R33
209+ // $this->assertStringNotContainsString("->after('username')", $columnWithoutPreviousCol->getCode());
210+ $ this ->assertFalse (strpos ($ columnWithoutPreviousCol ->getCode (), "->after('username') " ));
203211 }
204212}
0 commit comments