File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
packages/framework/tests/Unit/Support Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -101,6 +101,17 @@ public function testAbsoluteMediaPathIsNormalizedToRelativeMediaPath()
101101 $ this ->assertSame ('_media/foo ' , MediaFile::make (Hyde::path ('_media/foo ' ))->path );
102102 }
103103
104+ public function testCustomMediaPathsAreNormalizedToRelativeCustomizedMediaPath ()
105+ {
106+ Hyde::setMediaDirectory ('bar ' );
107+
108+ $ this ->assertSame ('bar/foo ' , MediaFile::make ('foo ' )->path );
109+ $ this ->assertSame ('bar/foo ' , MediaFile::make ('bar/foo ' )->path );
110+ $ this ->assertSame ('bar/foo ' , MediaFile::make (Hyde::path ('foo ' ))->path );
111+
112+ Hyde::setMediaDirectory ('_media ' );
113+ }
114+
104115 public function testGetNameReturnsNameOfFile ()
105116 {
106117 $ this ->assertSame ('foo.txt ' , MediaFile::make ('foo.txt ' )->getName ());
You can’t perform that action at this time.
0 commit comments