@@ -68,10 +68,9 @@ public function output_writes_nothing_without_render_statements()
68
68
*/
69
69
public function output_writes_views_for_render_statements ()
70
70
{
71
- $ template = $ this ->stub ('view.stub ' );
72
71
$ this ->files ->expects ('stub ' )
73
72
->with ('view.stub ' )
74
- ->andReturn ($ template );
73
+ ->andReturn ($ this -> stub ( ' view.stub ' ) );
75
74
76
75
$ this ->files ->shouldReceive ('exists ' )
77
76
->times (2 )
@@ -81,13 +80,13 @@ public function output_writes_views_for_render_statements()
81
80
->with ('resources/views/user/index.blade.php ' )
82
81
->andReturnFalse ();
83
82
$ this ->files ->expects ('put ' )
84
- ->with ('resources/views/user/index.blade.php ' , str_replace ( ' {{ view }} ' , ' user.index ' , $ template ));
83
+ ->with ('resources/views/user/index.blade.php ' , $ this -> fixture ( ' views/ user.index.blade.php ' ));
85
84
86
85
$ this ->files ->expects ('exists ' )
87
86
->with ('resources/views/user/create.blade.php ' )
88
87
->andReturnFalse ();
89
88
$ this ->files ->expects ('put ' )
90
- ->with ('resources/views/user/create.blade.php ' , str_replace ( ' {{ view }} ' , ' user.create ' , $ template ));
89
+ ->with ('resources/views/user/create.blade.php ' , $ this -> fixture ( ' views/ user.create.blade.php ' ));
91
90
92
91
$ this ->files ->expects ('exists ' )
93
92
->with ('resources/views/post ' )
@@ -98,7 +97,7 @@ public function output_writes_views_for_render_statements()
98
97
$ this ->files ->expects ('makeDirectory ' )
99
98
->with ('resources/views/post ' , 0755 , true );
100
99
$ this ->files ->expects ('put ' )
101
- ->with ('resources/views/post/show.blade.php ' , str_replace ( ' {{ view }} ' , ' post.show ' , $ template ));
100
+ ->with ('resources/views/post/show.blade.php ' , $ this -> fixture ( ' views/ post.show.blade.php ' ));
102
101
103
102
$ tokens = $ this ->blueprint ->parse ($ this ->fixture ('drafts/render-statements.yaml ' ));
104
103
$ tree = $ this ->blueprint ->analyze ($ tokens );
0 commit comments