test: update other test assertions

This commit is contained in:
kenjis 2024-05-08 15:07:06 +09:00
parent 700612c927
commit 28bb81591b
No known key found for this signature in database
GPG Key ID: BD254878922AF198
3 changed files with 19 additions and 5 deletions

View File

@ -429,15 +429,24 @@ final class FilesystemHelperTest extends CIUnitTestCase
public function testGetDirFileInfo(): void
{
$file = SUPPORTPATH . 'Files/baker/banana.php';
$info = get_file_info($file);
$file1 = SUPPORTPATH . 'Files/baker/banana.php';
$info1 = get_file_info($file1);
$file2 = SUPPORTPATH . 'Files/baker/fig_3.php.txt';
$info2 = get_file_info($file2);
$expected = [
'banana.php' => [
'name' => 'banana.php',
'server_path' => $file,
'size' => $info['size'],
'date' => $info['date'],
'server_path' => $file1,
'size' => $info1['size'],
'date' => $info1['date'],
'relative_path' => realpath(__DIR__ . '/../../_support/Files/baker'),
],
'fig_3.php.txt' => [
'name' => 'fig_3.php.txt',
'server_path' => $file2,
'size' => $info2['size'],
'date' => $info2['date'],
'relative_path' => realpath(__DIR__ . '/../../_support/Files/baker'),
],
];

View File

@ -86,6 +86,7 @@ final class PublisherInputTest extends CIUnitTestCase
$this->directory . 'fig_3.php',
$this->directory . 'prune_ripe.php',
SUPPORTPATH . 'Files/baker/banana.php',
SUPPORTPATH . 'Files/baker/fig_3.php.txt',
];
$publisher->addPath('Files');
@ -121,6 +122,7 @@ final class PublisherInputTest extends CIUnitTestCase
$this->directory . 'fig_3.php',
$this->directory . 'prune_ripe.php',
SUPPORTPATH . 'Files/baker/banana.php',
SUPPORTPATH . 'Files/baker/fig_3.php.txt',
SUPPORTPATH . 'Log/Handlers/TestHandler.php',
];

View File

@ -161,6 +161,7 @@ final class PublisherOutputTest extends CIUnitTestCase
$this->root->url() . '/able/fig_3.php',
$this->root->url() . '/able/prune_ripe.php',
$this->root->url() . '/baker/banana.php',
$this->root->url() . '/baker/fig_3.php.txt',
];
$this->assertFileDoesNotExist($this->root->url() . '/able/fig_3.php');
@ -183,6 +184,7 @@ final class PublisherOutputTest extends CIUnitTestCase
$this->root->url() . '/able/fig_3.php',
$this->root->url() . '/able/prune_ripe.php',
$this->root->url() . '/baker/banana.php',
$this->root->url() . '/baker/fig_3.php.txt',
];
$result = $publisher->addPath('/')->merge(true);
@ -200,6 +202,7 @@ final class PublisherOutputTest extends CIUnitTestCase
$this->root->url() . '/able/apple.php',
$this->root->url() . '/able/prune_ripe.php',
$this->root->url() . '/baker/banana.php',
$this->root->url() . '/baker/fig_3.php.txt',
];
mkdir($this->root->url() . '/able/fig_3.php');