Skip to content

Commit

Permalink
remove unused Nette/Finder package + integration tests for Nette/File…
Browse files Browse the repository at this point in the history
…System
  • Loading branch information
passchn committed Sep 21, 2023
1 parent e99a757 commit d6a793e
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 1 deletion.
1 change: 0 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
"intervention/image": "^2.7.2",
"josegonzalez/cakephp-upload": "^7.0.1",
"league/csv": "^9.8",
"nette/finder": "^2.5 || ^3.0.0",
"nette/utils": "^3.2 || ^4.0.0"
},
"require-dev": {
Expand Down
25 changes: 25 additions & 0 deletions tests/integration/Nette/FileSystemTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?php
declare(strict_types=1);

namespace Assets\Test\integration\Nette;

use Cake\TestSuite\TestCase;
use Nette\Utils\FileSystem;

class FileSystemTest extends TestCase
{
protected const FILE_PATH = __DIR__ . DS . 'example-file.txt';

public function testFindFiles(): void
{
$content = FileSystem::read(static::FILE_PATH);
static::assertEquals('This is a file.', trim($content));

$copyPath = static::FILE_PATH . '.copy';
FileSystem::copy(static::FILE_PATH, $copyPath);
static::assertFileExists($copyPath);

FileSystem::delete($copyPath);
static::assertFileDoesNotExist($copyPath);
}
}
1 change: 1 addition & 0 deletions tests/integration/Nette/example-file.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This is a file.

0 comments on commit d6a793e

Please sign in to comment.