Files
filegator/tests/backend/Unit/Auth/JsonAuthTest.php
Chun-Sheng, Li ea6933883f Test enhancement (#18)
Wow! Thank you very much for fixing all this.

Cheers!
2019-10-22 14:06:37 +02:00

39 lines
768 B
PHP

<?php
/*
* This file is part of the FileGator package.
*
* (c) Milos Stojanovic <alcalbg@gmail.com>
*
* For the full copyright and license information, please view the LICENSE file
*/
namespace Tests\Unit\Auth;
use Filegator\Services\Auth\Adapters\JsonFile;
/**
* @internal
*/
class JsonFileTest extends AuthTest
{
private $mock_file = TEST_DIR.'/mockusers.json';
protected function tearDown(): void
{
@unlink($this->mock_file);
@unlink($this->mock_file.'.blank');
}
public function setAuth()
{
@unlink($this->mock_file);
@touch($this->mock_file.'.blank');
$this->auth = new JsonFile($this->session);
$this->auth->init([
'file' => $this->mock_file,
]);
}
}