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
13
13
*/
14
14
public function it_converts_curl_requests_to_http_client_code ($ fixture )
15
15
{
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 () );
18
18
19
19
$ this ->assertSame (0 , $ code );
20
- $ this ->assertSame (file_get_contents ( ' tests/fixtures/ ' . $ fixture . '.out ' ), $ output );
20
+ $ this ->assertSame ($ this -> fixture ( $ fixture . '.out ' ), $ output );
21
21
}
22
22
23
23
public function curlCommandFixtures ()
@@ -41,4 +41,9 @@ public function curlCommandFixtures()
41
41
'Entire transaction timeout ' => ['max-timeout ' ],
42
42
];
43
43
}
44
+
45
+ private function fixture (string $ fixture )
46
+ {
47
+ return trim (file_get_contents ('tests/fixtures/ ' . $ fixture ));
48
+ }
44
49
}
You can’t perform that action at this time.
0 commit comments