1
0
mirror of https://github.com/danog/file.git synced 2024-12-11 16:59:39 +01:00
file/test/KeyedFileMutexTest.php
Bob Weinand 503c1b5c0a
Add KeyedFileMutex (#62)
* Add KeyedFileMutex

* Rebase and update

* Style fix

* Swap prefix for directory

---------

Co-authored-by: Aaron Piotrowski <aaron@trowski.com>
2024-03-10 23:06:03 -05:00

28 lines
533 B
PHP

<?php declare(strict_types=1);
namespace Amp\File\Test;
use Amp\File\KeyedFileMutex;
use Amp\Sync\AbstractKeyedMutexTest;
use Amp\Sync\KeyedMutex;
final class KeyedFileMutexTest extends AbstractKeyedMutexTest
{
protected function setUp(): void
{
parent::setUp();
Fixture::init();
}
protected function tearDown(): void
{
parent::tearDown();
Fixture::clear();
}
public function createMutex(): KeyedMutex
{
return new KeyedFileMutex(Fixture::path());
}
}