コード例 #1
0
ファイル: TableRowTest.php プロジェクト: no-chris/connector
 public function testEmptyValueEraseCurrentValue()
 {
     $newTableRow = new TableRow(TableRowTest::TABLE_NAME, $this->db, $this->logger);
     $newTableRow->intcol = 15;
     $newTableRow->varchar32 = "123456789";
     $newId = $newTableRow->save();
     $tableRowtoUpdate = new TableRow(TableRowTest::TABLE_NAME, $this->db, $this->logger);
     $tableRowtoUpdate->get($newId);
     $this->assertEquals("123456789", $tableRowtoUpdate->varchar32);
     $tableRowtoUpdate->varchar32 = "";
     $tableRowtoUpdate->update($newId);
     $tableRowUpdated = new TableRow(TableRowTest::TABLE_NAME, $this->db, $this->logger);
     $tableRowUpdated->get($newId);
     $this->assertEquals("", $tableRowUpdated->varchar32);
 }
コード例 #2
0
ファイル: OrdersTest.php プロジェクト: no-chris/connector
 public function testImportOrderPaidByCMCIC()
 {
     $bfOrder = $this->bfOrdersArray[6];
     $okOrderId = $this->xmlImporter->importOrder($bfOrder);
     $okOrder = new TableRow("orders", $this->db, $this->logger);
     $okOrder->get($okOrderId);
     $this->assertEquals("EXT_EDI7CMCIC - PAYMENT_NOT_AUTH", $okOrder->payment_method);
     $this->assertEquals(Orders::ORDER_STATUS_CMCIC, $okOrder->orders_status);
     $this->checkOrderStatusHistoryRow($okOrderId, 1, Orders::ORDER_STATUS_CMCIC, $bfOrder->OrderPayment->asXml());
 }