Skip to content

Commit

Permalink
Update dir paths
Browse files Browse the repository at this point in the history
  • Loading branch information
iMattPro committed Dec 31, 2024
1 parent 0774bcc commit 0145b92
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/unit/helper_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,14 +119,14 @@ protected function setUp(): void
$phpbb_root_path
);

@copy(__DIR__ . '/fixtures/foo.png', $this->phpbb_root_path . $this->storage_path . '/foo.png');
@copy(__DIR__ . '/fixtures/foo.png', __DIR__ . '/../site_icons/foo.png');
}

protected function tearDown(): void
{
foreach (['foo.png', 'bar.png'] as $file)
{
$path = $this->phpbb_root_path . $this->storage_path . '/' . $file;
$path = __DIR__ . '/../site_icons/' . $file;
if (file_exists($path))
{
@unlink($path);
Expand Down Expand Up @@ -190,10 +190,10 @@ public function test_delete_icon($icon, $exception, $expected)
public function test_resync_icons()
{
// delete physical foo.png file
@unlink($this->phpbb_root_path . $this->storage_path . '/foo.png');
@unlink(__DIR__ . '/../site_icons/foo.png');

// add new bar.png file
@copy(__DIR__ . '/fixtures/bar.png', $this->phpbb_root_path . $this->storage_path . '/bar.png');
@copy(__DIR__ . '/fixtures/bar.png', __DIR__ . '/../site_icons/bar.png');

// assert our storage tracking is currently still tracking the deleted image only
$this->assertEquals(['foo.png'], $this->storage->get_tracked_files());
Expand Down

0 comments on commit 0145b92

Please sign in to comment.