@@ -70,11 +70,12 @@ public function output_generates_test_for_controller_tree_l8($definition, $path,
7070 ->with ($ dirname , 0755 , true );
7171
7272 $ this ->filesystem ->expects ('put ' )
73- ->with ($ path , $ this ->fixture ($ test ));
73+ ->with ($ path , $ this ->fixture ($ test ));
7474 }
7575
7676 $ tokens = $ this ->blueprint ->parse ($ this ->fixture ($ definition ));
7777 $ tree = $ this ->blueprint ->analyze ($ tokens );
78+
7879 $ this ->assertEquals (['created ' => array_keys ($ paths )], $ this ->subject ->output ($ tree ));
7980 }
8081
@@ -97,17 +98,20 @@ public function output_works_for_pascal_case_definition_l8()
9798 $ this ->filesystem ->expects ('exists ' )
9899 ->with (dirname ($ certificateControllerTest ))
99100 ->andReturnTrue ();
101+
100102 $ this ->filesystem ->expects ('put ' )
101103 ->with ($ certificateControllerTest , $ this ->fixture ('tests/certificate-pascal-case-example.php ' ));
102104
103105 $ this ->filesystem ->expects ('exists ' )
104106 ->with (dirname ($ certificateTypeControllerTest ))
105107 ->andReturnTrue ();
108+
106109 $ this ->filesystem ->expects ('put ' )
107110 ->with ($ certificateTypeControllerTest , $ this ->fixture ('tests/certificate-type-pascal-case-example.php ' ));
108111
109112 $ tokens = $ this ->blueprint ->parse ($ this ->fixture ('drafts/pascal-case.yaml ' ));
110113 $ tree = $ this ->blueprint ->analyze ($ tokens );
114+
111115 $ this ->assertEquals (['created ' => [$ certificateControllerTest , $ certificateTypeControllerTest ]], $ this ->subject ->output ($ tree ));
112116 }
113117
@@ -123,11 +127,14 @@ public function output_generates_test_for_controller_tree_using_cached_model_l8(
123127 $ this ->filesystem ->expects ('stub ' )
124128 ->with ('test.case.stub ' )
125129 ->andReturn ($ this ->stub ('test.case.stub ' ));
130+
126131 $ this ->filesystem ->expects ('exists ' )
127132 ->with ('tests/Feature/Http/Controllers ' )
128133 ->andReturnFalse ();
134+
129135 $ this ->filesystem ->expects ('makeDirectory ' )
130136 ->with ('tests/Feature/Http/Controllers ' , 0755 , true );
137+
131138 $ this ->filesystem ->expects ('put ' )
132139 ->with ('tests/Feature/Http/Controllers/UserControllerTest.php ' , $ this ->fixture ('tests/reference-cache.php ' ));
133140
@@ -161,17 +168,21 @@ public function output_generates_tests_with_models_with_custom_namespace_correct
161168 $ this ->filesystem ->expects ('stub ' )
162169 ->with ('test.case.stub ' )
163170 ->andReturn ($ this ->stub ('test.case.stub ' ));
171+
164172 $ dirname = dirname ($ path );
165173 $ this ->filesystem ->expects ('exists ' )
166174 ->with ($ dirname )
167175 ->andReturnFalse ();
176+
168177 $ this ->filesystem ->expects ('makeDirectory ' )
169- ->with ($ dirname , 0755 , true );
178+ ->with ($ dirname , 0755 , true );
179+
170180 $ this ->filesystem ->expects ('put ' )
171181 ->with ($ path , $ this ->fixture ($ test ));
172182
173183 $ tokens = $ this ->blueprint ->parse ($ this ->fixture ($ definition ));
174184 $ tree = $ this ->blueprint ->analyze ($ tokens );
185+
175186 $ this ->assertEquals (['created ' => [$ path ]], $ this ->subject ->output ($ tree ));
176187 }
177188
@@ -187,8 +198,8 @@ public function output_using_return_types()
187198 $ this ->app ['config ' ]->set ('blueprint.use_return_types ' , true );
188199
189200 $ this ->filesystem ->expects ('stub ' )
190- ->with ('test.class.stub ' )
191- ->andReturn ($ this ->stub ('test.class.stub ' ));
201+ ->with ('test.class.stub ' )
202+ ->andReturn ($ this ->stub ('test.class.stub ' ));
192203
193204 $ this ->filesystem ->expects ('stub ' )
194205 ->with ('test.case.stub ' )
@@ -219,6 +230,7 @@ public function controllerTreeDataProvider()
219230 ['drafts/readme-example-notification-model.yaml ' , 'tests/Feature/Http/Controllers/PostControllerTest.php ' , 'tests/readme-example-notification.php ' ],
220231 ['drafts/respond-statements.yaml ' , 'tests/Feature/Http/Controllers/Api/PostControllerTest.php ' , 'tests/respond-statements.php ' ],
221232 ['drafts/full-crud-example.yaml ' , 'tests/Feature/Http/Controllers/PostControllerTest.php ' , 'tests/full-crud-example.php ' ],
233+ ['drafts/crud-show-only.yaml ' , 'tests/Feature/Http/Controllers/PostControllerTest.php ' , 'tests/crud-show-only.php ' ],
222234 ['drafts/model-reference-validate.yaml ' , 'tests/Feature/Http/Controllers/CertificateControllerTest.php ' , 'tests/api-shorthand-validation.php ' ],
223235 ['drafts/controllers-only-no-context.yaml ' , 'tests/Feature/Http/Controllers/ReportControllerTest.php ' , 'tests/controllers-only-no-context.php ' ],
224236 ['drafts/call-to-a-member-function-columns-on-null.yaml ' , [
0 commit comments