Пример #1
0
 public function testExportWithInvalidData()
 {
     $this->okOrdersStatusesArray[0]->order_id = TestsHelpers::getXChars(50);
     $this->xmlExporter = new OrdersStatuses($this->iniParams, $this->okOrdersStatusesArray, $this->logger);
     $this->xmlExporter->generateXml($this->fileName);
     $this->assertTrue(TestsHelpers::testUserLogContains("Skipping following order status"));
 }
Пример #2
0
 public function testExportWithInvalidData()
 {
     $this->okProductsUpdatesArray[0]->sku = TestsHelpers::getXChars(50);
     $this->xmlExporter = new ProductsUpdates($this->iniParams, $this->okProductsUpdatesArray, $this->logger);
     $this->xmlExporter->generateXml($this->fileName);
     $this->assertTrue(TestsHelpers::testUserLogContains("Skipping following product update"));
 }
Пример #3
0
 public function testRemoveOrphan_RemovesProductWithoutManufacturer()
 {
     $this->okProductsArray[2]->products_manufacturers_id = "UNKNOWN";
     $productsFilter = new OkProductsFilter($this->okManufacturersArray, $this->logger);
     $productsWithoutOrphans = $productsFilter->removeOrphans($this->okProductsArray);
     $this->assertEquals(count($this->okProductsArray) - 1, count($productsWithoutOrphans));
     TestsHelpers::testUserLogContains("Product <PROD3> has unresolved Manufacturer <UNKNOWN> dependency");
     TestsHelpers::testUserLogContains("Removing product <PROD3> : <stdClass Object(  [sku] => PROD3  [products_manufacturers_id] => UNKNOWN)>");
 }