Skip to content

Commit cd473a5

Browse files
committed
updated test
1 parent 793e310 commit cd473a5

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

tests/unit/Mage/Core/Model/Email/Template/AbstractTest.php

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ public function setUp(): void
3737
* @group Mage_Core
3838
* @group Mage_Core_Model
3939
*/
40-
public function testValidateFileExension(bool $expectedResult, string $extension, string $filePath): void
40+
public function testValidateFileExension(bool $expectedResult, string $filePath, string $extension, bool $fileExists): void
4141
{
42-
if ($expectedResult) {
42+
if ($fileExists) {
4343
$this->assertFileExists($filePath);
4444
} else {
4545
$this->assertFileDoesNotExist($filePath);
@@ -52,13 +52,21 @@ public function provideValidateFileExension(): Generator
5252
{
5353
yield 'css file exists' => [
5454
true,
55-
'css',
5655
$_SERVER['TEST_ROOT'] . '/unit/fixtures/files/test.css',
56+
'css',
57+
true,
5758
];
58-
yield 'css file not exists' => [
59+
yield 'css file exists, but empty' => [
5960
false,
61+
$_SERVER['TEST_ROOT'] . '/unit/fixtures/files/test-empty.css',
6062
'css',
63+
true,
64+
];
65+
yield 'css file not exists' => [
66+
false,
6167
$_SERVER['TEST_ROOT'] . '/unit/fixtures/files/test.not-exist',
68+
'css',
69+
false,
6270
];
6371
}
6472
}

tests/unit/fixtures/files/test-empty.css

Whitespace-only changes.

0 commit comments

Comments
 (0)