mirror of
https://github.com/codeigniter4/CodeIgniter4.git
synced 2025-02-20 11:44:28 +08:00
test: update other test assertions
This commit is contained in:
parent
700612c927
commit
28bb81591b
@ -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'),
|
||||
],
|
||||
];
|
||||
|
@ -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',
|
||||
];
|
||||
|
||||
|
@ -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');
|
||||
|
Loading…
x
Reference in New Issue
Block a user