Skip to content

Commit 98b3e8f

Browse files
committed
chore: update some example and test code
1 parent b2e65c2 commit 98b3e8f

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

example/dir-watcher.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
* Time: 21:40
88
*/
99

10-
use Toolkit\FsUtil\ModifyWatcher;
10+
use Toolkit\FsUtil\Extra\ModifyWatcher;
1111

12-
require dirname(__DIR__) . '/test/boot.php';
12+
require dirname(__DIR__) . '/test/bootstrap.php.php';
1313

1414
$mw = new ModifyWatcher();
1515
$ret = $mw

example/file-finder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
use Toolkit\FsUtil\FileFinder;
1010

11-
require dirname(__DIR__) . '/test/boot.php';
11+
require dirname(__DIR__) . '/test/bootstrap.php';
1212

1313
// var_dump(fnmatch('.*', ".gitkeep"));die;
1414
// var_dump(glob(__DIR__ . '/{t,T}ests', GLOB_BRACE | GLOB_ONLYDIR));

test/FsTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,13 @@ public function testIsExclude_isInclude(): void
4848
$this->assertTrue(FS::isInclude('./abc.php', []));
4949
$this->assertTrue(FS::isInclude('./abc.php', ['*']));
5050
$this->assertTrue(FS::isInclude('./abc.php', ['*.php']));
51+
$this->assertTrue(FS::isInclude('path/to/abc.php', ['*.php']));
5152
$this->assertFalse(FS::isInclude('./abc.php', ['*.xml']));
5253

5354
$this->assertFalse(FS::isExclude('./abc.php', []));
5455
$this->assertTrue(FS::isExclude('./abc.php', ['*']));
5556
$this->assertTrue(FS::isExclude('./abc.php', ['*.php']));
57+
$this->assertTrue(FS::isExclude('path/to/abc.php', ['*.php']));
5658
$this->assertFalse(FS::isExclude('./abc.php', ['*.yml']));
5759
}
5860

0 commit comments

Comments
 (0)