-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
remove unused Nette/Finder package + integration tests for Nette/File…
…System
- Loading branch information
Showing
3 changed files
with
26 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
This is a file. |