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 |   44 +++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 43 insertions(+), 1 deletions(-)

diff --git a/tests/Vola/UploadFile/FilesFilterTest.php b/tests/Vola/UploadFile/FilesFilterTest.php
index 126d059..d642d7a 100644
--- a/tests/Vola/UploadFile/FilesFilterTest.php
+++ b/tests/Vola/UploadFile/FilesFilterTest.php
@@ -28,9 +28,51 @@
     public function testEmpty()
     {
         $atteso = '{}';
+        $atteso = '[]';
         $esito = $this->object->toJson();
         
         $this->assertEquals($atteso, $esito);
     }
-    
+
+    public function testAddGif()
+    {
+        $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