File tree Expand file tree Collapse file tree 3 files changed +16
-13
lines changed Expand file tree Collapse file tree 3 files changed +16
-13
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,8 @@ This serves two purposes:
2323- The ` hasFeature ` method on the Hyde facade and HydeKernel now only accepts a Feature enum value instead of a string for its parameter.
2424- Changed how the documentation search is generated, to be an ` InMemoryPage ` instead of a post-build task.
2525- Media asset files are now copied using the new build task instead of the deprecated ` BuildService::transferMediaAssets() ` method.
26+ - Calling the ` Include::path() ` method will no longer create the includes directory in https://github.com/hydephp/develop/pull/1707
27+
2628
2729### Deprecated
2830- for soon-to-be removed features.
Original file line number Diff line number Diff line change 77use Hyde \Hyde ;
88use Hyde \Markdown \Models \Markdown ;
99use Illuminate \Support \Facades \Blade ;
10- use Hyde \Framework \Concerns \InteractsWithDirectories ;
1110
1211use function basename ;
1312use function file_exists ;
2019 */
2120class Includes
2221{
23- use InteractsWithDirectories;
24-
2522 /**
2623 * @var string The directory where includes are stored.
2724 */
@@ -35,8 +32,6 @@ class Includes
3532 */
3633 public static function path (?string $ filename = null ): string
3734 {
38- static ::needsDirectory (static ::$ includesDirectory );
39-
4035 return $ filename === null
4136 ? Hyde::path (static ::$ includesDirectory )
4237 : Hyde::path (static ::$ includesDirectory .'/ ' .$ filename );
Original file line number Diff line number Diff line change 1515 */
1616class IncludesFacadeTest extends TestCase
1717{
18+ protected function setUp (): void
19+ {
20+ parent ::setUp ();
21+
22+ File::makeDirectory (Includes::path (), recursive: true );
23+ }
24+
25+ public function tearDown (): void
26+ {
27+ File::deleteDirectory (Includes::path ());
28+
29+ parent ::tearDown ();
30+ }
31+
1832 public function testPathReturnsTheIncludesDirectory ()
1933 {
2034 $ this ->assertSame (
@@ -31,14 +45,6 @@ public function testPathReturnsAPartialWithinTheIncludesDirectory()
3145 );
3246 }
3347
34- public function testPathCreatesDirectoryIfItDoesNotExist ()
35- {
36- $ path = Includes::path ();
37- File::deleteDirectory ($ path );
38- $ this ->assertFalse (File::exists ($ path ));
39- $ this ->assertTrue (File::exists (Includes::path ()));
40- }
41-
4248 public function testGetReturnsPartial ()
4349 {
4450 $ expected = 'foo bar ' ;
You can’t perform that action at this time.
0 commit comments