fix: update code because of file changes

See https://github.com/codeigniter4/CodeIgniter4/pull/8734
This commit is contained in:
kenjis 2024-04-09 17:02:46 +09:00
parent d344ab63fb
commit 26c9fce62c
No known key found for this signature in database
GPG Key ID: BD254878922AF198
2 changed files with 2 additions and 2 deletions

View File

@ -57,7 +57,7 @@ class ClearDebugbar extends BaseCommand
{
helper('filesystem');
if (! delete_files(WRITEPATH . 'debugbar')) {
if (! delete_files(WRITEPATH . 'debugbar', false, true)) {
// @codeCoverageIgnoreStart
CLI::error('Error deleting the debugbar JSON files.');
CLI::newLine();

View File

@ -61,7 +61,7 @@ final class ClearDebugbarTest extends CIUnitTestCase
$result = $this->getStreamFilterBuffer();
$this->assertFileDoesNotExist(WRITEPATH . 'debugbar' . DIRECTORY_SEPARATOR . "debugbar_{$this->time}.json");
$this->assertFileExists(WRITEPATH . 'debugbar' . DIRECTORY_SEPARATOR . '.gitkeep');
$this->assertFileExists(WRITEPATH . 'debugbar' . DIRECTORY_SEPARATOR . 'index.html');
$this->assertStringContainsString('Debugbar cleared.', $result);
}
}