File tree Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -43,27 +43,37 @@ protected function setUp(): void
4343 #[Test]
4444 public function it_does_not_wipe_target_directory_while_recreating_asset_symlink ()
4545 {
46- (new AddAssetSymlinkFolders ($ this ->filesystem , $ this -> getConfig ()))->handle ();
46+ (new AddAssetSymlinkFolders ($ this ->filesystem , static :: cachedConfigurationForWorkbench ()))->handle ();
4747
4848 $ this ->assertDirectoryExists (join_paths (default_skeleton_path (), 'storage ' , 'framework ' ));
4949 }
5050
5151 #[Test]
5252 public function it_does_not_wipe_target_directory_while_removing_asset_symlink ()
5353 {
54- (new RemoveAssetSymlinkFolders ($ this ->filesystem , $ this -> getConfig ()))->handle ();
54+ (new RemoveAssetSymlinkFolders ($ this ->filesystem , static :: cachedConfigurationForWorkbench ()))->handle ();
5555
5656 $ this ->assertDirectoryExists (join_paths (default_skeleton_path (), 'storage ' , 'framework ' ));
5757 }
5858
59+ /**
60+ * Ensure symlink directory exists for the test.
61+ *
62+ * @return void
63+ */
5964 protected function ensureSymlinkExists (): void
6065 {
6166 if (! is_symlink (workbench_path ('storage ' ))) {
6267 $ this ->filesystem ->link (default_skeleton_path ('storage ' ), workbench_path ('storage ' ));
6368 }
6469 }
6570
66- protected function getConfig (): Config
71+ /**
72+ * Define or get the cached uses for test case.
73+ *
74+ * @return \Orchestra\Testbench\Contracts\Config
75+ */
76+ public static function cachedConfigurationForWorkbench ()
6777 {
6878 return new Config ([
6979 'workbench ' => [
You can’t perform that action at this time.
0 commit comments