UploadFileTest::setUp()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
c 2
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
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