File tree Expand file tree Collapse file tree 1 file changed +2
-11
lines changed Expand file tree Collapse file tree 1 file changed +2
-11
lines changed Original file line number Diff line number Diff line change 1717
1818class NovaTestGenerator extends AbstractTestsGenerator
1919{
20- protected string $ novaPath ;
21-
2220 protected string $ novaResourceClassName ;
2321
24- public function __construct ()
25- {
26- parent ::__construct ();
27-
28- $ this ->novaPath = base_path ($ this ->paths ['nova ' ]);
29- }
30-
3122 public function generate (): void
3223 {
3324 if (class_exists (NovaServiceProvider::class)) {
@@ -116,7 +107,7 @@ protected function getActions(): array
116107
117108 protected function getNovaFiles (): Generator
118109 {
119- $ iterator = new RecursiveIteratorIterator (new RecursiveDirectoryIterator ($ this ->novaPath ));
110+ $ iterator = new RecursiveIteratorIterator (new RecursiveDirectoryIterator (base_path ( $ this ->paths [ ' nova ' ]) ));
120111
121112 foreach ($ iterator as $ file ) {
122113 if ($ file ->isFile () && $ file ->getExtension () === 'php ' ) {
@@ -130,7 +121,7 @@ protected function getCommonNovaResources(): array
130121 $ resources = [];
131122
132123 foreach ($ this ->getNovaFiles () as $ file ) {
133- $ relativePath = Str::after ($ file ->getPathname (), $ this ->novaPath . DIRECTORY_SEPARATOR );
124+ $ relativePath = Str::after ($ file ->getPathname (), $ this ->paths [ ' nova ' ] . DIRECTORY_SEPARATOR );
134125
135126 $ class = Str::before ($ relativePath , '. ' );
136127
You can’t perform that action at this time.
0 commit comments