Skip to content

Commit

Permalink
Add testcase
Browse files Browse the repository at this point in the history
  • Loading branch information
fezfez committed Dec 1, 2021
1 parent ad0f11f commit fa441d8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Filesystem.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ public function __construct($options = null, ?FilesystemInteractionInterface $fi

// clean total space buffer on change cache_dir
$events = $this->getEventManager();
$handle = function () {
$handle = function (): void {
};
$totalSpace = &$this->totalSpace;
$callback = function ($event) use (&$events, &$handle, &$totalSpace) {
Expand Down
10 changes: 10 additions & 0 deletions test/unit/FilesystemTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,16 @@ protected function tearDown(): void
parent::tearDown();
}

public function testFileSystemeOptionIsUpdatedWhenFileSystemeOptionIsChange(): void
{
$storage = new Filesystem();
$options = new FilesystemOptions();
$storage->setOptions($options);
$options->setCacheDir($this->tmpCacheDir);

$this->assertSame($this->tmpCacheDir, $storage->getOptions()->getCacheDir());
}

public function testSetNoAtimeChangesAtimeOfMetadataCapability(): void
{
$capabilities = $this->storage->getCapabilities();
Expand Down

0 comments on commit fa441d8

Please sign in to comment.