File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -16,6 +16,8 @@ class FileExt extends Validator
1616
1717 const TYPE_GZIP = 'gz ' ;
1818
19+ const TYPE_ZIP = 'zip ' ;
20+
1921 /**
2022 * @var array
2123 */
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ class FileExtTest extends TestCase
1414
1515 public function setUp (): void
1616 {
17- $ this ->object = new FileExt ([FileExt::TYPE_GIF , FileExt::TYPE_GZIP ]);
17+ $ this ->object = new FileExt ([FileExt::TYPE_GIF , FileExt::TYPE_GZIP , FileExt:: TYPE_ZIP ]);
1818 }
1919
2020 public function tearDown (): void
@@ -36,5 +36,7 @@ public function testValues()
3636 $ this ->assertEquals ($ this ->object ->isValid ('file.tar.gz ' ), true );
3737 $ this ->assertEquals ($ this ->object ->isValid ('file.gz ' ), true );
3838 $ this ->assertEquals ($ this ->object ->isValid ('file.GIF ' ), true );
39+ $ this ->assertEquals ($ this ->object ->isValid ('file.zip ' ), true );
40+ $ this ->assertEquals ($ this ->object ->isValid ('file.7zip ' ), false );
3941 }
4042}
You can’t perform that action at this time.
0 commit comments