11<?php
22
3- namespace JunaidQadirB \Cray \Tests ;
3+ namespace JunaidQadirB \Cray \Tests \ Feature ;
44
55use Illuminate \Support \Facades \Artisan ;
6+ use JunaidQadirB \Cray \Tests \TestCase ;
67
78class ViewMakeCommandTest extends TestCase
89{
@@ -15,7 +16,7 @@ public function test_stubs_must_exist()
1516 public function test_cray_view_command_generates_all_views ()
1617 {
1718 $ this ->withoutMockingConsoleOutput ();
18- $ this ->assertDirectoryNotExists (resource_path ('views/posts ' ));
19+ $ this ->assertDirectoryDoesNotExist (resource_path ('views/posts ' ));
1920 $ this ->artisan ('cray:view Post ' );
2021 $ output = Artisan::output ();
2122 $ this ->assertSame ('View created successfully in /resources/views/posts/index.blade.php ' . PHP_EOL .
@@ -34,26 +35,26 @@ public function test_cray_view_command_generates_all_views()
3435
3536 public function test_it_will_create_only_index_file ()
3637 {
37- $ this ->assertDirectoryNotExists (resource_path ('views/posts ' ));
38- $ this ->assertFileNotExists (resource_path ('views/posts/index.blade.php ' ));
39- $ this ->assertFileNotExists (resource_path ('views/posts/create.blade.php ' ));
40- $ this ->assertFileNotExists (resource_path ('views/posts/edit.blade.php ' ));
41- $ this ->assertFileNotExists (resource_path ('views/posts/show.blade.php ' ));
42- $ this ->assertFileNotExists (resource_path ('views/posts/_form.blade.php ' ));
43- $ this ->assertFileNotExists (resource_path ('views/posts/modals/delete.blade.php ' ));
38+ $ this ->assertDirectoryDoesNotExist (resource_path ('views/posts ' ));
39+ $ this ->assertFileDoesNotExist (resource_path ('views/posts/index.blade.php ' ));
40+ $ this ->assertFileDoesNotExist (resource_path ('views/posts/create.blade.php ' ));
41+ $ this ->assertFileDoesNotExist (resource_path ('views/posts/edit.blade.php ' ));
42+ $ this ->assertFileDoesNotExist (resource_path ('views/posts/show.blade.php ' ));
43+ $ this ->assertFileDoesNotExist (resource_path ('views/posts/_form.blade.php ' ));
44+ $ this ->assertFileDoesNotExist (resource_path ('views/posts/modals/delete.blade.php ' ));
4445 $ this ->artisan ('cray:view Post -i ' );
4546 $ output = Artisan::output ();
4647 $ this ->assertFileExists (resource_path ('views/posts/index.blade.php ' ));
47- $ this ->assertFileNotExists (resource_path ('views/posts/show.blade.php ' ));
48- $ this ->assertFileNotExists (resource_path ('views/posts/create.blade.php ' ));
49- $ this ->assertFileNotExists (resource_path ('views/posts/_form.blade.php ' ));
48+ $ this ->assertFileDoesNotExist (resource_path ('views/posts/show.blade.php ' ));
49+ $ this ->assertFileDoesNotExist (resource_path ('views/posts/create.blade.php ' ));
50+ $ this ->assertFileDoesNotExist (resource_path ('views/posts/_form.blade.php ' ));
5051 $ this ->assertFileExists (resource_path ('views/posts/modals/delete.blade.php ' ));
5152
5253 }
5354
5455 public function test_it_will_create_only_create_file ()
5556 {
56- $ this ->assertDirectoryNotExists (resource_path ('views/posts ' ));
57+ $ this ->assertDirectoryDoesNotExist (resource_path ('views/posts ' ));
5758 $ this ->artisan ('cray:view Post -c ' );
5859 $ output = Artisan::output ();
5960 $ this ->assertFileExists (resource_path ('views/posts/create.blade.php ' ));
@@ -62,7 +63,7 @@ public function test_it_will_create_only_create_file()
6263
6364 public function test_it_will_create_only_edit_file ()
6465 {
65- $ this ->assertDirectoryNotExists (resource_path ('views/posts ' ));
66+ $ this ->assertDirectoryDoesNotExist (resource_path ('views/posts ' ));
6667 $ this ->artisan ('cray:view Post -e ' );
6768 $ output = Artisan::output ();
6869 $ this ->assertFileExists (resource_path ('views/posts/edit.blade.php ' ));
@@ -71,20 +72,20 @@ public function test_it_will_create_only_edit_file()
7172
7273 public function test_it_will_create_only_show_file ()
7374 {
74- $ this ->assertDirectoryNotExists (resource_path ('views/posts ' ));
75- $ this ->assertFileNotExists (resource_path ('views/posts/show.blade.php ' ));
76- $ this ->assertFileNotExists (resource_path ('views/posts/create.blade.php ' ));
77- $ this ->assertFileNotExists (resource_path ('views/posts/index.blade.php ' ));
78- $ this ->assertFileNotExists (resource_path ('views/posts/_form.blade.php ' ));
79- $ this ->assertFileNotExists (resource_path ('views/posts/modals/delete.blade.php ' ));
75+ $ this ->assertDirectoryDoesNotExist (resource_path ('views/posts ' ));
76+ $ this ->assertFileDoesNotExist (resource_path ('views/posts/show.blade.php ' ));
77+ $ this ->assertFileDoesNotExist (resource_path ('views/posts/create.blade.php ' ));
78+ $ this ->assertFileDoesNotExist (resource_path ('views/posts/index.blade.php ' ));
79+ $ this ->assertFileDoesNotExist (resource_path ('views/posts/_form.blade.php ' ));
80+ $ this ->assertFileDoesNotExist (resource_path ('views/posts/modals/delete.blade.php ' ));
8081 $ this ->artisan ('cray:view Post -s ' );
8182 $ output = Artisan::output ();
8283 $ this ->assertFileExists (resource_path ('views/posts/show.blade.php ' ));
83- $ this ->assertFileNotExists (resource_path ('views/posts/index.blade.php ' ));
84- $ this ->assertFileNotExists (resource_path ('views/posts/create.blade.php ' ));
85- $ this ->assertFileNotExists (resource_path ('views/posts/edit.blade.php ' ));
86- $ this ->assertFileNotExists (resource_path ('views/posts/_form.blade.php ' ));
87- $ this ->assertFileNotExists (resource_path ('views/posts/modals/delete.blade.php ' ));
84+ $ this ->assertFileDoesNotExist (resource_path ('views/posts/index.blade.php ' ));
85+ $ this ->assertFileDoesNotExist (resource_path ('views/posts/create.blade.php ' ));
86+ $ this ->assertFileDoesNotExist (resource_path ('views/posts/edit.blade.php ' ));
87+ $ this ->assertFileDoesNotExist (resource_path ('views/posts/_form.blade.php ' ));
88+ $ this ->assertFileDoesNotExist (resource_path ('views/posts/modals/delete.blade.php ' ));
8889 }
8990
9091 public function test_it_will_give_error_message_when_index_view_exists ()
@@ -114,7 +115,7 @@ public function test_it_will_overwrite_existing_view_when_index_view_is_passed_f
114115 public function test_it_will_give_error_message_when_create_view_exists ()
115116 {
116117 $ this ->withoutMockingConsoleOutput ();
117- $ this ->assertDirectoryNotExists (resource_path ('views/posts ' ));
118+ $ this ->assertDirectoryDoesNotExist (resource_path ('views/posts ' ));
118119 $ this ->artisan ('cray:view Post -c ' );
119120 $ this ->assertDirectoryExists (resource_path ('views/posts ' ));
120121 $ this ->artisan ('cray:view Post -c ' );
@@ -126,7 +127,7 @@ public function test_it_will_give_error_message_when_create_view_exists()
126127 public function test_it_will_overwrite_existing_view_when_create_view_is_passed_force_flag ()
127128 {
128129 $ this ->withoutMockingConsoleOutput ();
129- $ this ->assertDirectoryNotExists (resource_path ('views/posts ' ));
130+ $ this ->assertDirectoryDoesNotExist (resource_path ('views/posts ' ));
130131 $ this ->artisan ('cray:view Post -c ' );
131132 $ this ->assertDirectoryExists (resource_path ('views/posts ' ));
132133 $ this ->artisan ('cray:view Post -c --force ' );
0 commit comments