Skip to content

Commit d6a793e

Browse files
committed
remove unused Nette/Finder package + integration tests for Nette/FileSystem
1 parent e99a757 commit d6a793e

3 files changed

Lines changed: 26 additions & 1 deletion

File tree

composer.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
"intervention/image": "^2.7.2",
1111
"josegonzalez/cakephp-upload": "^7.0.1",
1212
"league/csv": "^9.8",
13-
"nette/finder": "^2.5 || ^3.0.0",
1413
"nette/utils": "^3.2 || ^4.0.0"
1514
},
1615
"require-dev": {
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<?php
2+
declare(strict_types=1);
3+
4+
namespace Assets\Test\integration\Nette;
5+
6+
use Cake\TestSuite\TestCase;
7+
use Nette\Utils\FileSystem;
8+
9+
class FileSystemTest extends TestCase
10+
{
11+
protected const FILE_PATH = __DIR__ . DS . 'example-file.txt';
12+
13+
public function testFindFiles(): void
14+
{
15+
$content = FileSystem::read(static::FILE_PATH);
16+
static::assertEquals('This is a file.', trim($content));
17+
18+
$copyPath = static::FILE_PATH . '.copy';
19+
FileSystem::copy(static::FILE_PATH, $copyPath);
20+
static::assertFileExists($copyPath);
21+
22+
FileSystem::delete($copyPath);
23+
static::assertFileDoesNotExist($copyPath);
24+
}
25+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
This is a file.

0 commit comments

Comments
 (0)