@@ -9,55 +9,52 @@ class ManifestTest extends TestCase
99 /** @test */
1010 public function generates_controllers_imports_given_a_path ()
1111 {
12- $ join = function ($ paths ) {
13- return implode (DIRECTORY_SEPARATOR , $ paths );
14- };
15- $ manifest = (new Manifest )->generateFrom ($ join ([
12+ $ manifest = (new Manifest )->generateFrom (implode (DIRECTORY_SEPARATOR , [
1613 __DIR__ ,
1714 'stubs ' ,
1815 'controllers ' ,
1916 ]).DIRECTORY_SEPARATOR )->join (PHP_EOL );
2017
2118 $ this ->assertStringContainsString (
22- <<<JS
19+ <<<'JS'
2320
24- import HelloController from ' { $ join ([ ' . ' , ' hello_controller ' ])} '
21+ import HelloController from './ hello_controller'
2522 application.register('hello', HelloController)
2623 JS,
2724 $ manifest ,
2825 );
2926
3027 $ this ->assertStringContainsString (
31- <<<JS
28+ <<<'JS'
3229
33- import Nested__DeepController from ' { $ join ([ ' . ' , ' nested ' , ' deep_controller ' ])} '
30+ import Nested__DeepController from './ nested/ deep_controller'
3431 application.register('nested--deep', Nested__DeepController)
3532 JS,
3633 $ manifest ,
3734 );
3835
3936 $ this ->assertStringContainsString (
40- <<<JS
37+ <<<'JS'
4138
42- import CoffeeController from ' { $ join ([ ' . ' , ' coffee_controller ' ])} '
39+ import CoffeeController from './ coffee_controller'
4340 application.register('coffee', CoffeeController)
4441 JS,
4542 $ manifest ,
4643 );
4744
4845 $ this ->assertStringContainsString (
49- <<<JS
46+ <<<'JS'
5047
51- import TypeScriptController from ' { $ join ([ ' . ' , ' type_script_controller ' ])} '
48+ import TypeScriptController from './ type_script_controller'
5249 application.register('type-script', TypeScriptController)
5350 JS,
5451 $ manifest ,
5552 );
5653
5754 $ this ->assertStringNotContainsString (
58- <<<JS
55+ <<<'JS'
5956
60- import Index from ' { $ join ([ ' . ' , ' index ' ])} '
57+ import Index from './ index'
6158 application.register('index', Index)
6259 JS,
6360 $ manifest ,
0 commit comments