Classi per la configurazione upload
Cristiano Magro
2019-07-08 f3a323ad32817b3a5324387356c386453181cfe9
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<?php
/**
 * User: Cristiano Magro
 * Date: 08/07/2019
 */
 
class FilesFilterTest extends PHPUnit_Framework_TestCase
{
    /** @var FilesFilter $object */
    protected $object;
 
    /**
     * Set up fixture, inizializzazione dei test.
     * Eseguito prima di ogni test
     */
    protected function setUp() {
        $this->object = new FilesFilter();
    }
 
    /**
     * Tears down the fixture, for example, closes a network connection.
     * This method is called after a test is executed.
     */
    protected function tearDown() {
 
    }
 
    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);
    }
    
}