Example #1
0
 /**
  * Test get method
  */
 public function testGet()
 {
     $this->assertEquals('RegularPrice', $this->pool->get('regular_price'));
     $this->assertEquals('SpecialPrice', $this->pool->get('special_price'));
 }
 /**
  * Test current method
  */
 public function testCurrent()
 {
     $this->factoryMock->expects($this->once())->method('create')->with($this->equalTo($this->saleableItemMock), $this->equalTo($this->pool->current()), $this->quantity)->will($this->returnValue($this->priceMock));
     $this->assertEquals($this->priceMock, $this->collection->current());
 }
Example #3
0
 /**
  * Checks if current position is valid
  *
  * @return bool
  */
 public function valid()
 {
     return $this->pool->valid();
 }