Passed
Pull Request — master (#82)
by David
02:40
created

StandardObjectStorageTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
dl 0
loc 11
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A testObjectStorage() 0 9 1
1
<?php
2
3
namespace TheCodingMachine\TDBM;
4
5
6
class StandardObjectStorageTest extends \PHPUnit_Framework_TestCase
7
{
8
    public function testObjectStorage()
9
    {
10
        $objectStorage = new StandardObjectStorage();
11
        $this->assertNull($objectStorage->get('foo', 42));
12
        $dbRow = $this->createMock(DbRow::class);
13
        $objectStorage->set('foo', 42, $dbRow);
14
        $this->assertSame($dbRow, $objectStorage->get('foo', 42));
15
        $objectStorage->remove('foo', 42);
16
        $this->assertNull($objectStorage->get('foo', 42));
17
    }
18
}
19