Skip to content

Commit 28bb815

Browse files
committed
test: update other test assertions
1 parent 700612c commit 28bb815

3 files changed

Lines changed: 19 additions & 5 deletions

File tree

tests/system/Helpers/FilesystemHelperTest.php

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -429,15 +429,24 @@ public function testGetFilenamesWithSymlinks(): void
429429

430430
public function testGetDirFileInfo(): void
431431
{
432-
$file = SUPPORTPATH . 'Files/baker/banana.php';
433-
$info = get_file_info($file);
432+
$file1 = SUPPORTPATH . 'Files/baker/banana.php';
433+
$info1 = get_file_info($file1);
434+
$file2 = SUPPORTPATH . 'Files/baker/fig_3.php.txt';
435+
$info2 = get_file_info($file2);
434436

435437
$expected = [
436438
'banana.php' => [
437439
'name' => 'banana.php',
438-
'server_path' => $file,
439-
'size' => $info['size'],
440-
'date' => $info['date'],
440+
'server_path' => $file1,
441+
'size' => $info1['size'],
442+
'date' => $info1['date'],
443+
'relative_path' => realpath(__DIR__ . '/../../_support/Files/baker'),
444+
],
445+
'fig_3.php.txt' => [
446+
'name' => 'fig_3.php.txt',
447+
'server_path' => $file2,
448+
'size' => $info2['size'],
449+
'date' => $info2['date'],
441450
'relative_path' => realpath(__DIR__ . '/../../_support/Files/baker'),
442451
],
443452
];

tests/system/Publisher/PublisherInputTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ public function testAddPathDirectoryRecursive(): void
8686
$this->directory . 'fig_3.php',
8787
$this->directory . 'prune_ripe.php',
8888
SUPPORTPATH . 'Files/baker/banana.php',
89+
SUPPORTPATH . 'Files/baker/fig_3.php.txt',
8990
];
9091

9192
$publisher->addPath('Files');
@@ -121,6 +122,7 @@ public function testAddPathsRecursive(): void
121122
$this->directory . 'fig_3.php',
122123
$this->directory . 'prune_ripe.php',
123124
SUPPORTPATH . 'Files/baker/banana.php',
125+
SUPPORTPATH . 'Files/baker/fig_3.php.txt',
124126
SUPPORTPATH . 'Log/Handlers/TestHandler.php',
125127
];
126128

tests/system/Publisher/PublisherOutputTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,7 @@ public function testMerge(): void
161161
$this->root->url() . '/able/fig_3.php',
162162
$this->root->url() . '/able/prune_ripe.php',
163163
$this->root->url() . '/baker/banana.php',
164+
$this->root->url() . '/baker/fig_3.php.txt',
164165
];
165166

166167
$this->assertFileDoesNotExist($this->root->url() . '/able/fig_3.php');
@@ -183,6 +184,7 @@ public function testMergeReplace(): void
183184
$this->root->url() . '/able/fig_3.php',
184185
$this->root->url() . '/able/prune_ripe.php',
185186
$this->root->url() . '/baker/banana.php',
187+
$this->root->url() . '/baker/fig_3.php.txt',
186188
];
187189

188190
$result = $publisher->addPath('/')->merge(true);
@@ -200,6 +202,7 @@ public function testMergeCollides(): void
200202
$this->root->url() . '/able/apple.php',
201203
$this->root->url() . '/able/prune_ripe.php',
202204
$this->root->url() . '/baker/banana.php',
205+
$this->root->url() . '/baker/fig_3.php.txt',
203206
];
204207

205208
mkdir($this->root->url() . '/able/fig_3.php');

0 commit comments

Comments
 (0)