public function setUp()
 {
     parent::setUp();
     $config = SmashPigDatabaseTestConfiguration::instance();
     Context::initWithLogger($config);
     $this->db = DamagedDatabase::get();
     $this->db->createTable();
 }
 public function setUp()
 {
     parent::setUp();
     $this->config = AdyenTestConfiguration::createWithSuccessfulApi();
     Context::initWithLogger($this->config);
     $this->jobQueue = $this->config->object('data-store/jobs-adyen');
     $this->jobQueue->createTable('jobs-adyen');
 }
 public function setUp()
 {
     parent::setUp();
     $this->config = AdyenTestConfiguration::createWithSuccessfulApi();
     Context::initWithLogger($this->config);
     $this->jobQueue = BaseQueueConsumer::getQueue('jobs-adyen');
     $this->jobQueue->createTable('jobs-adyen');
 }
 public function setUp()
 {
     parent::setUp();
     $config = SmashPigDatabaseTestConfiguration::instance();
     Context::initWithLogger($config);
     $this->pendingDb = PendingDatabase::get();
     $this->pendingDb->createTable();
     $this->paymentsInitialDb = PaymentsInitialDatabase::get();
     $this->paymentsInitialDb->createTable();
 }
 public function setUp()
 {
     parent::setUp();
     Context::initWithLogger(QueueTestConfiguration::instance());
     $this->queue = BaseQueueConsumer::getQueue('test');
     $this->queue->createTable('test');
     $damagedDb = DamagedDatabase::get();
     $damagedDb->createTable();
     $this->damaged = $damagedDb->getDatabase();
 }
 public function setUp()
 {
     parent::setUp();
     $this->config = AdyenTestConfiguration::createWithSuccessfulApi();
     Context::initWithLogger($this->config);
     $this->pendingDatabase = PendingDatabase::get();
     $this->pendingMessage = json_decode(file_get_contents(__DIR__ . '/../Data/pending.json'), true);
     $this->pendingDatabase->storeMessage($this->pendingMessage);
     $this->antifraudQueue = BaseQueueConsumer::getQueue('payments-antifraud');
 }
 public function setUp()
 {
     parent::setUp();
     $this->config = AdyenTestConfiguration::createWithSuccessfulApi();
     Context::initWithLogger($this->config);
     $this->pendingDatabase = PendingDatabase::get();
     $this->pendingMessage = json_decode(file_get_contents(__DIR__ . '/../Data/pending.json'), true);
     $this->pendingMessage['captured'] = true;
     $this->pendingDatabase->storeMessage($this->pendingMessage);
 }
 public function setUp()
 {
     parent::setUp();
     // Merge db and queue test configs.
     $config = TestingConfiguration::loadConfigWithFileOverrides(array(__DIR__ . '/data/config_smashpig_db.yaml', __DIR__ . '/data/config_queue.yaml'));
     Context::initWithLogger($config);
     $this->pendingDb = PendingDatabase::get();
     $this->pendingDb->createTable();
     $this->paymentsInitialDb = PaymentsInitialDatabase::get();
     $this->paymentsInitialDb->createTable();
 }
 public function setUp()
 {
     parent::setUp();
     $this->config = PayPalTestConfiguration::get();
     // php-queue\PDO complains about pop() from non-existent table
     $this->config->object('data-store/jobs-paypal')->createTable('jobs-paypal');
     Context::initWithLogger($this->config);
     foreach (self::$message_data as $file => $type) {
         self::$messages[] = array('type' => $type, 'payload' => json_decode(file_get_contents(__DIR__ . '/../Data/' . $file), true));
     }
 }
 public function setUp()
 {
     parent::setUp();
     chdir(__DIR__ . '/..');
     // So the mock client can find its response files
     $config = AmazonTestConfiguration::instance();
     Context::initWithLogger($config);
     $this->mockClient = $config->object('payments-client', true);
     $this->mockClient->calls = array();
     $this->mockClient->returns = array();
     $this->mockClient->exceptions = array();
 }
 /**
  * Set a test configuration and initialize the context
  *
  * @param string $configNode node to use for configuration overrides
  * @param string $configPath path to configuration override file
  * @return Configuration
  */
 function setConfig($configNode = 'default', $configPath = null)
 {
     $config = Configuration::createForViewWithOverrideFile($configNode, $configPath);
     Context::initWithLogger($config);
     return $config;
 }
 public function setUp()
 {
     parent::setUp();
     Context::initWithLogger(AmazonTestConfiguration::instance());
 }