Completed
Push — master ( 2f0783...0fb3d7 )
by Markus
03:33
created

ServiceStorageTest   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 3
c 1
b 0
f 1
lcom 0
cbo 3
dl 0
loc 26
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A testIsCalledService() 0 6 1
A testInfo() 0 10 1
A dummy() 0 4 1
1
<?php
2
namespace Mathielen\ImportEngine\Storage;
3
4
class ServiceStorageTest extends \PHPUnit_Framework_TestCase
5
{
6
7
    public function testIsCalledService()
8
    {
9
        $storage = new ServiceStorage([$this, 'dummy']);
10
11
        $this->assertTrue($storage->isCalledService($this));
12
    }
13
14
    public function testInfo()
15
    {
16
        $storage = new ServiceStorage([$this, 'dummy']);
17
18
        $this->assertEquals(new StorageInfo([
19
            'name' => 'Mathielen\ImportEngine\Storage\ServiceStorageTest->dummy',
20
            'format' => 'Service method',
21
            'count' => 0
22
        ]), $storage->info());
23
    }
24
25
    public function dummy()
26
    {
27
        return [];
28
    }
29
}
30