protected function setUp()
 {
     $this->db = TestsHelpers::getDb();
     $iniParams = TestsHelpers::getIniParams();
     $this->okChannel = new OkChannel($iniParams->get("channelId"), $this->db);
     $this->dataProvider = new OkManufacturersDataProvider($this->db, $this->okChannel->getLanguageId());
 }
Пример #2
0
 public function setUp()
 {
     $this->db = TestsHelpers::getDb();
     $this->db->setVerboseMode();
     $this->iniParams = TestsHelpers::getIniParams();
     $this->okChannel = new OkChannel($this->iniParams->get("channelId"), $this->db);
 }
Пример #3
0
 protected function setUp()
 {
     $iniParams = TestsHelpers::getIniParams();
     $this->ftpHost = $iniParams->get("ftpHost");
     $this->ftpUser = $iniParams->get("ftpUser");
     $this->ftpPass = $iniParams->get("ftpPass");
     $this->ftp = new Ftp($this->ftpHost, $this->ftpUser, $this->ftpPass);
 }
 protected function setUp()
 {
     $this->db = TestsHelpers::getDb();
     $this->db->setVerboseMode();
     $this->iniParams = TestsHelpers::getIniParams();
     $this->okChannel = new OkChannel($this->iniParams->get("channelId"), $this->db);
     $this->logger = LoggerFactory::getFileLogger(TestsHelpers::getUserLog(), Logger::WARNING);
 }
Пример #5
0
 protected function setUp()
 {
     $this->db = TestsHelpers::getDb();
     $this->iniParams = TestsHelpers::getIniParams();
     $systemLogger = LoggerFactory::getFileLogger(TestsHelpers::getSystemLog(), Logger::INFO);
     $this->connectorSet = new OkToBf($this->iniParams, $systemLogger);
     $this->connector = null;
 }
 protected function setUp()
 {
     $this->db = TestsHelpers::getDb();
     $this->db->setVerboseMode();
     $this->iniParams = TestsHelpers::getIniParams();
     $this->okChannel = new OkChannel($this->iniParams->get("channelId"), $this->db);
     $this->dataProvider = new OkCategoriesDataProvider($this->db, $this->okChannel->getLanguageId());
 }
 protected function setUp()
 {
     $this->logger = LoggerFactory::getFileLogger(TestsHelpers::getUserLog(), Logger::WARNING);
     $this->bfManufacturerValidator = new BfManufacturerValidator($this->logger);
     $iniParams = TestsHelpers::getIniParams();
     $this->bfManufacturer = BfObjectFactory::getInstance("BfManufacturer", $iniParams->get("bfVersion"));
     TestsHelpers::cleanAllLogs();
 }
 protected function setUp()
 {
     $this->db = TestsHelpers::getDb();
     $iniParams = TestsHelpers::getIniParams();
     $this->okChannel = new OkChannel($iniParams->get("channelId"), $this->db);
     $this->dataProvider = new OkOrdersStatusDataProvider($this->db, $this->okChannel->getCustomersId());
     // we have to set the shipping date so the feed returns results
     $sql = "UPDATE shipping_orders SET shipping_date = NOW()";
     $this->db->execute($sql, array());
 }
Пример #9
0
 protected function setUp()
 {
     TestsHelpers::cleanAllLogs();
     $iniParams = TestsHelpers::getIniParams();
     $this->idPrefix = $iniParams->get("idPrefix");
     $this->bfVersion = $iniParams->get("bfVersion");
     $this->logger = LoggerFactory::getFileLogger(TestsHelpers::getUserLog(), Logger::WARNING);
     $this->xmlItemMapper = new CategoryMapper($this->idPrefix, $this->bfVersion, $this->logger);
     $this->db = TestsHelpers::getDb();
     $this->okChannel = new OkChannel($iniParams->get("channelId"), $this->db);
 }
Пример #10
0
 protected function setUp()
 {
     TestsHelpers::cleanAllLogs();
     $this->iniParams = TestsHelpers::getIniParams();
     $this->idPrefix = $this->iniParams->get("idPrefix");
     $this->bfVersion = $this->iniParams->get("bfVersion");
     $this->taxCategory = $this->iniParams->get("taxCategory");
     $this->viewAllowCategory = $this->iniParams->get("viewAllowCategory");
     $this->logger = LoggerFactory::getFileLogger(TestsHelpers::getUserLog(), Logger::WARNING);
     $this->xmlItemMapper = new ProductMapper($this->idPrefix, $this->bfVersion, $this->taxCategory, $this->viewAllowCategory, $this->logger);
 }
Пример #11
0
 protected function setUp()
 {
     $this->db = TestsHelpers::getDb();
     //$this->db->setVerboseMode();
     $this->logger = LoggerFactory::getFileLogger(TestsHelpers::getUserLog(), Logger::INFO);
     $this->iniParams = TestsHelpers::getIniParams();
     $this->okChannel = new OkChannel($this->iniParams->get("channelId"), $this->db);
     $this->xmlImporter = new Orders($this->okChannel, $this->iniParams, $this->db, $this->logger);
     $bfOrderDataProvider = new BfOrderDataProvider(__DIR__ . '/Data/orders.xml');
     $this->bfOrdersArray = $bfOrderDataProvider->getOrders();
     $locale = $this->iniParams->get("locale");
     I18n::setLocale($locale);
     self::deleteTestsOrders($this->iniParams, $this->db);
 }
Пример #12
0
 protected function setUp()
 {
     TestsHelpers::cleanAllLogs();
     $iniParams = TestsHelpers::getIniParams();
     $this->idPrefix = $iniParams->get("idPrefix");
     $this->bfVersion = $iniParams->get("bfVersion");
     $this->orderShipCarrier = $iniParams->get("orderShipCarrier");
     $this->orderShipMethod = $iniParams->get("orderShipMethod");
     $this->logger = LoggerFactory::getFileLogger(TestsHelpers::getUserLog(), Logger::WARNING);
     $this->xmlItemMapper = new OrderStatusMapper($this->bfVersion, $this->orderShipCarrier, $this->orderShipMethod, $this->logger);
     $this->db = TestsHelpers::getDb();
     $this->okChannel = new OkChannel($iniParams->get("channelId"), $this->db);
     // we have to set the shipping date so the feed returns results
     $sql = "UPDATE shipping_orders SET shipping_date = NOW()";
     $this->db->execute($sql, array());
 }
Пример #13
0
 protected function setUp()
 {
     $this->db = TestsHelpers::getDb();
     //$this->db->setVerboseMode();
     $this->iniParams = TestsHelpers::getIniParams();
     $this->idPrefix = $this->iniParams->get("idPrefix");
     $this->okChannel = new OkChannel($this->iniParams->get("channelId"), $this->db);
     $this->logger = LoggerFactory::getFileLogger(TestsHelpers::getUserLog(), Logger::WARNING);
     TestsHelpers::cleanAllLogs();
     $csvFile = new CsvFile(__DIR__ . "/Data/okProducts.csv", "\t");
     $this->okProductsUpdatesArray = $csvFile->getAll();
     array_splice($this->okProductsUpdatesArray, 10);
     $this->xmlExporter = new ProductsUpdates($this->iniParams, $this->okProductsUpdatesArray, $this->logger);
     $this->fileName = __DIR__ . "/Data/Exports/ProductsUpdates.xml";
     if (file_exists($this->fileName)) {
         unlink($this->fileName);
     }
 }
Пример #14
0
 protected function setUp()
 {
     $this->db = TestsHelpers::getDb();
     $this->db->setVerboseMode();
     $this->iniParams = TestsHelpers::getIniParams();
     $this->bfVersion = $this->iniParams->get("bfVersion");
     $this->okChannel = new OkChannel($this->iniParams->get("channelId"), $this->db);
     $this->logger = LoggerFactory::getFileLogger(TestsHelpers::getUserLog(), Logger::WARNING);
     TestsHelpers::cleanAllLogs();
     $okOrdersStatusesDataProvider = new OkOrdersStatusDataProvider($this->db, $this->okChannel->getCustomersId());
     $this->okOrdersStatusesArray = $okOrdersStatusesDataProvider->getAll();
     $this->xmlExporter = new OrdersStatuses($this->iniParams, $this->okOrdersStatusesArray, $this->logger);
     $this->fileName = __DIR__ . "/Data/Exports/OrdersStatuses.xml";
     if (file_exists($this->fileName)) {
         unlink($this->fileName);
     }
     // we have to set the shipping date so the feed returns results
     $sql = "UPDATE shipping_orders SET shipping_date = NOW()";
     $this->db->execute($sql, array());
 }
Пример #15
0
 protected function setUp()
 {
     $this->iniParams = TestsHelpers::getIniParams();
 }
Пример #16
0
 public static function getFtpConnection()
 {
     $iniParams = TestsHelpers::getIniParams();
     $ftp = new Ftp($iniParams->get("ftpHost"), $iniParams->get("ftpUser"), $iniParams->get("ftpPass"));
     return $ftp;
 }
Пример #17
0
 protected function setUp()
 {
     $this->iniParams = TestsHelpers::getIniParams();
     $this->systemLogger = LoggerFactory::getFileLogger(TestsHelpers::getSystemLog(), Logger::INFO);
 }