From 3245f42704c099ce468efe21af084a9a9601caf9 Mon Sep 17 00:00:00 2001
From: Cristiano Magro <cristiano.magro@vola.it>
Date: Tue, 27 Aug 2019 11:21:38 +0200
Subject: [PATCH] nuovi test per aggiungere e creare filtri.
---
tests/Vola/UploadFile/FilesFilterTest.php | 35 +++++++++++++++++++++++++++++++++--
1 files changed, 33 insertions(+), 2 deletions(-)
diff --git a/tests/Vola/UploadFile/FilesFilterTest.php b/tests/Vola/UploadFile/FilesFilterTest.php
index f8b2b8b..d642d7a 100644
--- a/tests/Vola/UploadFile/FilesFilterTest.php
+++ b/tests/Vola/UploadFile/FilesFilterTest.php
@@ -36,12 +36,43 @@
public function testAddGif()
{
- $atteso = '{"title":"Image files","extensions":"gif"}';
+ $atteso = '[{"title":"Image files","extensions":"gif"}]';
$this->object->addExt('gif');
$esito = $this->object->toJson();
$this->assertEquals($atteso, $esito);
}
-
+
+ public function testAddDoc()
+ {
+ $atteso = '[{"title":"Documenti","extensions":"doc"}]';
+
+ $this->object->addExt('doc');
+ $esito = $this->object->toJson();
+
+ $this->assertEquals($atteso, $esito);
+ }
+
+ public function testAddDocGif()
+ {
+ $atteso = '[{"title":"Documenti","extensions":"doc"},{"title":"Image files","extensions":"gif"}]';
+
+ $this->object->addExt('doc');
+ $this->object->addExt('gif');
+ $esito = $this->object->toJson();
+
+ $this->assertEquals($atteso, $esito);
+ }
+
+ public function testAddMaiuscolo()
+ {
+ $atteso = '[{"title":"Documenti","extensions":"doc"}]';
+
+ $this->object->addExt('DOC');
+ $esito = $this->object->toJson();
+
+ $this->assertEquals($atteso, $esito);
+ }
+
}
\ No newline at end of file
--
Gitblit v1.8.0