FileUploadValidatorEmptyFilesVariableTest   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 34
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 4
lcom 1
cbo 2
dl 0
loc 34
rs 10
c 1
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A testFilesVariableEmptyForIsBetween() 0 4 1
A testFilesVariableEmptyForIsMimeType() 0 4 1
A testFilesVariableEmptyForHasValidUploadDirectory() 0 4 1
A testFilesVariableEmptyForNotOverwritingExistingFileMethod() 0 4 1
1
<?php
2
/**
3
 * Author: Nil Portugués Calderó <[email protected]>
4
 * Date: 9/26/14
5
 * Time: 9:29 PM
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
11
namespace Tests\NilPortugues\Validator\Validation\FileUpload;
12
13
use NilPortugues\Validator\Validation\FileUpload\FileUploadValidation;
14
15
/**
16
 * Class FileUploadValidatorEmptyFilesVariableTest
17
 * @package Tests\NilPortugues\Validator\Validation\FileUploadAttribute
18
 */
19
class FileUploadValidatorEmptyFilesVariableTest extends \PHPUnit_Framework_TestCase
20
{
21
    /**
22
     * @test
23
     */
24
    public function testFilesVariableEmptyForIsBetween()
25
    {
26
        $this->assertFalse(FileUploadValidation::isBetween('property', 0, 1, 'MB'));
27
    }
28
29
    /**
30
     * @test
31
     */
32
    public function testFilesVariableEmptyForIsMimeType()
33
    {
34
        $this->assertFalse(FileUploadValidation::isMimeType('property', ['image/jpeg']));
35
    }
36
37
    /**
38
     * @test
39
     */
40
    public function testFilesVariableEmptyForHasValidUploadDirectory()
41
    {
42
        $this->assertFalse(FileUploadValidation::hasValidUploadDirectory('property', './'));
43
    }
44
45
    /**
46
     * @test
47
     */
48
    public function testFilesVariableEmptyForNotOverwritingExistingFileMethod()
49
    {
50
        $this->assertFalse(FileUploadValidation::notOverwritingExistingFile('property', './'));
51
    }
52
}
53