| | |
| | | * Set up fixture, inizializzazione dei test. |
| | | * Eseguito prima di ogni test |
| | | */ |
| | | protected function setUp() { |
| | | 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() { |
| | | protected function tearDown() |
| | | { |
| | | |
| | | } |
| | | |
| | |
| | | $esito = $this->object->toJson(); |
| | | |
| | | $this->assertEquals($atteso, $esito); |
| | | |
| | | } |
| | | |
| | | public function addExtension(){ |
| | | public function addExtension() |
| | | { |
| | | return [ |
| | | [[], '[]'], |
| | | [['fasullo'], '[]'], |
| | | [['gif'], '[{"title":"Image files","extensions":"gif"}]'], |
| | | [['doc'], '[{"title":"Documenti","extensions":"doc"}]'], |
| | | [['DOC'], '[{"title":"Documenti","extensions":"doc"}]'], |
| | | [['DOc', 'gif'],'[{"title":"Documenti","extensions":"doc"},{"title":"Image files","extensions":"gif"}]'], |
| | | [[], '[]'], |
| | | [['fasullo'], '[]'], |
| | | [['gif'], '[{"title":"Image files","extensions":"gif"}]'], |
| | | [['doc'], '[{"title":"Documenti","extensions":"doc"}]'], |
| | | [['DOC'], '[{"title":"Documenti","extensions":"DOC"}]'], |
| | | [['txt'], '[{"title":"Documenti","extensions":"txt"}]'], |
| | | [['DOc', 'gif'], '[{"title":"Documenti","extensions":"DOc"},{"title":"Image files","extensions":"gif"}]'], |
| | | [['txt', 'doc'], '[{"title":"Documenti","extensions":"doc,txt"}]'], |
| | | [['gif', 'fasullo'], '[{"title":"Image files","extensions":"gif"}]'], |
| | | ]; |
| | | } |
| | | |