Completed
Push — master ( 53ff75...252438 )
by Markus
04:10
created

ServiceStorageTest::testIsCalledServiceClass()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 6
rs 9.4285
cc 1
eloc 3
nc 1
nop 0
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 testIsCalledServiceClass()
15
    {
16
        $storage = new ServiceStorage([$this, 'dummy']);
17
18
        $this->assertTrue($storage->isCalledService(self::class));
19
    }
20
21
    public function testInfo()
22
    {
23
        $storage = new ServiceStorage([$this, 'dummy']);
24
25
        $this->assertEquals(new StorageInfo([
26
            'name' => 'Mathielen\ImportEngine\Storage\ServiceStorageTest->dummy',
27
            'format' => 'Service method',
28
            'count' => 0
29
        ]), $storage->info());
30
    }
31
32
    public function dummy()
33
    {
34
        return [];
35
    }
36
}
37