File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
tests/Feature/Console/Commands Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -13,11 +13,11 @@ class CurlCommandTest extends TestCase
1313 */
1414 public function it_converts_curl_requests_to_http_client_code ($ fixture )
1515 {
16- $ code = Artisan::call ('shift: ' . trim ( file_get_contents ( ' tests/fixtures/ ' . $ fixture . '.in ' ) ));
17- $ output = Artisan::output ();
16+ $ code = Artisan::call ('shift: ' . $ this -> fixture ( $ fixture . '.in ' ));
17+ $ output = trim ( Artisan::output () );
1818
1919 $ this ->assertSame (0 , $ code );
20- $ this ->assertSame (file_get_contents ( ' tests/fixtures/ ' . $ fixture . '.out ' ), $ output );
20+ $ this ->assertSame ($ this -> fixture ( $ fixture . '.out ' ), $ output );
2121 }
2222
2323 public function curlCommandFixtures ()
@@ -41,4 +41,9 @@ public function curlCommandFixtures()
4141 'Entire transaction timeout ' => ['max-timeout ' ],
4242 ];
4343 }
44+
45+ private function fixture (string $ fixture )
46+ {
47+ return trim (file_get_contents ('tests/fixtures/ ' . $ fixture ));
48+ }
4449}
You can’t perform that action at this time.
0 commit comments