Skip to content
This repository has been archived by the owner on Jan 29, 2020. It is now read-only.

Commit

Permalink
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions test/Storage/Adapter/AbstractAdapterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -332,20 +332,16 @@ public function testInternalHasItemsCallsInternalHasItem()
{
$this->_storage = $this->getMockForAbstractAdapter(array('internalHasItem'));

$items = array('key1' => true, 'key2' => false);
$result = array('key1');
$items = array('key1' => true);

$i = 0; // method call counter
foreach ($items as $k => $v) {
$this->_storage
->expects($this->at($i++))
->method('internalHasItem')
->with($this->equalTo($k))
->will($this->returnValue($v));
}
$this->_storage
->expects($this->atLeastOnce())
->method('internalHasItem')
->with($this->equalTo('key1'))
->will($this->returnValue(true));

$rs = $this->_storage->hasItems(array_keys($items));
$this->assertEquals($result, $rs);
$this->assertEquals(array('key1'), $rs);
}

public function testGetMetadataCallsInternalGetMetadata()
Expand Down

0 comments on commit ba17210

Please sign in to comment.