Skip to content

Commit

Permalink
Move the tests to the new code location
Browse files Browse the repository at this point in the history
  • Loading branch information
caendesilva committed Jul 26, 2024
1 parent 678b6f7 commit 4647333
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 25 deletions.
25 changes: 0 additions & 25 deletions packages/framework/tests/Feature/HydeKernelTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -392,31 +392,6 @@ public function testGetMediaOutputDirectoryNameUsesTrimmedVersionOfMediaSourceDi
$this->assertSame('foo', Hyde::getMediaOutputDirectory());
}

public function testCanGetSiteMediaOutputDirectory()
{
// Todo: Move to MediaFileTest

$this->assertSame(Hyde::path('_site/media'), MediaFile::outputPath());
}

public function testGetSiteMediaOutputDirectoryUsesTrimmedVersionOfMediaSourceDirectory()
{
// Todo: Move to MediaFileTest

Hyde::setMediaDirectory('_foo');
$this->assertSame(Hyde::path('_site/foo'), MediaFile::outputPath());
}

public function testGetSiteMediaOutputDirectoryUsesConfiguredSiteOutputDirectory()
{
// Todo: Move to MediaFileTest

Hyde::setOutputDirectory(Hyde::path('foo'));
Hyde::setMediaDirectory('bar');

$this->assertSame(Hyde::path('foo/bar'), MediaFile::outputPath());
}

public function testMediaOutputDirectoryCanBeChangedInConfiguration()
{
$this->assertSame('_media', Hyde::getMediaDirectory());
Expand Down
19 changes: 19 additions & 0 deletions packages/framework/tests/Unit/Support/MediaFileTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -241,4 +241,23 @@ public function testGetMediaOutputPathReturnsAbsolutePath()
{
$this->assertSame(Hyde::path('_site/media'), MediaFile::outputPath());
}

public function testCanGetSiteMediaOutputDirectory()
{
$this->assertSame(Hyde::path('_site/media'), MediaFile::outputPath());
}

public function testGetSiteMediaOutputDirectoryUsesTrimmedVersionOfMediaSourceDirectory()
{
Hyde::setMediaDirectory('_foo');
$this->assertSame(Hyde::path('_site/foo'), MediaFile::outputPath());
}

public function testGetSiteMediaOutputDirectoryUsesConfiguredSiteOutputDirectory()
{
Hyde::setOutputDirectory(Hyde::path('foo'));
Hyde::setMediaDirectory('bar');

$this->assertSame(Hyde::path('foo/bar'), MediaFile::outputPath());
}
}

0 comments on commit 4647333

Please sign in to comment.