UploadFileTest   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setUp() 0 4 1
A testCreateService() 0 11 1
1
<?php
2
3
namespace DmFilemanTest\Factory\InputFilter;
4
5
use DmFileman\Factory\InputFilter\UploadFile;
6
7
use DmTest\ServiceManager\ServiceLocatorDummy;
8
9
class UploadFileTest extends \PHPUnit_Framework_TestCase
10
{
11
    /** @var UploadFile */
12
    private $sut;
13
14
    public function setUp()
15
    {
16
        $this->sut = new UploadFile;
17
    }
18
19
    /**
20
     * @covers DmFileman\Factory\InputFilter\UploadFile
21
     */
22
    public function testCreateService()
23
    {
24
        $serviceLocator = new ServiceLocatorDummy($this);
25
26
        $optionsHelper = $this->getMock('DmFileman\Helper\Options', ['getExtensions', 'getMaxSize'], [], '', false);
27
        $serviceLocator->set('DmFileman\Helper\Options', $optionsHelper);
28
29
        $result = $this->sut->createService($serviceLocator);
30
31
        $this->assertInstanceOf('DmFileman\InputFilter\UploadFile', $result);
32
    }
33
}
34