|
@@ 155-161 (lines=7) @@
|
| 152 |
|
} |
| 153 |
|
|
| 154 |
|
|
| 155 |
|
public function testGetListByTags() |
| 156 |
|
{ |
| 157 |
|
$this->mock->expects( $this->exactly( 2 ) )->method( 'getByTag' ) |
| 158 |
|
->with( $this->equalTo( 'key' ) )->will( $this->returnValue( array( 'key' => 'value' ) ) ); |
| 159 |
|
|
| 160 |
|
$this->assertEquals( array( 'key' => 'value' ), $this->object->getListByTags( array( 'key', 'key' ) ) ); |
| 161 |
|
} |
| 162 |
|
|
| 163 |
|
|
| 164 |
|
public function testGetListByTagsWithSiteId() |
|
@@ 164-172 (lines=9) @@
|
| 161 |
|
} |
| 162 |
|
|
| 163 |
|
|
| 164 |
|
public function testGetListByTagsWithSiteId() |
| 165 |
|
{ |
| 166 |
|
$object = new \Aimeos\MW\Cache\Flow( array( 'siteid' => 1 ), $this->mock ); |
| 167 |
|
|
| 168 |
|
$this->mock->expects( $this->once() )->method( 'getByTag' ) |
| 169 |
|
->with( $this->equalTo( '1-key' ) )->will( $this->returnValue( array( '1-key' => 'value' ) ) ); |
| 170 |
|
|
| 171 |
|
$this->assertEquals( array( 'key' => 'value' ), $object->getListByTags( array( 'key' ) ) ); |
| 172 |
|
} |
| 173 |
|
|
| 174 |
|
|
| 175 |
|
public function testSet() |
|
@@ 175-184 (lines=10) @@
|
| 172 |
|
} |
| 173 |
|
|
| 174 |
|
|
| 175 |
|
public function testSet() |
| 176 |
|
{ |
| 177 |
|
$this->mock->expects( $this->once() )->method( 'set' ) |
| 178 |
|
->with( |
| 179 |
|
$this->equalTo( 'key' ), $this->equalTo( 'value' ), |
| 180 |
|
$this->equalTo( array( 'tag' ) ), $this->greaterThan( 0 ) |
| 181 |
|
); |
| 182 |
|
|
| 183 |
|
$this->object->set( 'key', 'value', array( 'tag' ), '2000-01-01 00:00:00' ); |
| 184 |
|
} |
| 185 |
|
|
| 186 |
|
|
| 187 |
|
public function testSetWithSiteId() |