コード例 #1
0
ファイル: DBStorageTest.php プロジェクト: NaszvadiG/ImageCMS
 /**
  * @covers Cart\DBStorage::remove
  * @todo   Implement testRemove().
  */
 public function testRemove()
 {
     /** Sproduct array * */
     $data["SProducts_71_82"] = array('instance' => 'SProducts', 'id' => 82, 'quantity' => 5);
     /** ShopKit array * */
     $data['ShopKit_16'] = array('instance' => 'ShopKit', 'id' => 16, 'quantity' => 5);
     /** Save to storage * */
     $this->object->setData($data);
     $result = $this->object->remove('SProducts', 82);
     $this->assertTrue($result);
     $result = $this->object->remove(1);
     $this->assertFalse($result);
     $result = $this->object->remove('ShopKit', 16);
     $this->assertTrue($result);
     $result = $this->object->remove(2);
     $this->assertFalse($result);
     $result = $this->object->remove();
     $this->assertFalse($result);
 }