Skip to content

Commit 0907bc5

Browse files
committed
Test normalization
1 parent b20eab6 commit 0907bc5

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

packages/framework/tests/Unit/Support/MediaFileTest.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,16 @@ public function testAbsolutePathIsNormalizedToRelative()
8686
$this->assertSame('foo', MediaFile::make(Hyde::path('foo'))->path);
8787
}
8888

89+
public function testMediaPathIsNormalizedToRelative()
90+
{
91+
$this->assertSame('foo', MediaFile::make('_media/foo')->path);
92+
}
93+
94+
public function testAbsoluteMediaPathIsNormalizedToRelative()
95+
{
96+
$this->assertSame('foo', MediaFile::make(Hyde::path('_media/foo'))->path);
97+
}
98+
8999
public function testGetNameReturnsNameOfFile()
90100
{
91101
$this->assertSame('foo.txt', MediaFile::make('foo.txt')->getName());

0 commit comments

Comments
 (0)