/** * @covers Cart\SessionStorage::exportToDB * @todo Implement testExportToDB(). */ public function testExportToDB() { /** Save to storage * */ $this->object->setData(NULL); /** 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); /** Login **/ doLogin(); /** Clear database storage **/ $dbStorage = new \Cart\DBStorage(); $dbStorage->setData(NULL); $result = (bool) $this->object->exportToDB(); $this->assertTrue($result); }