You are here

protected function StripeTest::setUp in Webform CiviCRM Integration 8.5

Overrides WebformCivicrmTestBase::setUp

File

tests/src/FunctionalJavascript/StripeTest.php, line 17

Class

StripeTest
Tests submitting a Webform with CiviCRM: Contribution with Line Items

Namespace

Drupal\Tests\webform_civicrm\FunctionalJavascript

Code

protected function setUp() {
  parent::setUp();

  // Download installs and enables!
  $this->utils
    ->wf_civicrm_api('Extension', 'download', [
    'key' => "mjwshared",
  ]);
  $this->utils
    ->wf_civicrm_api('Extension', 'download', [
    'key' => "com.drastikbydesign.stripe",
  ]);
  $params = [];
  $result = $this->utils
    ->wf_civicrm_api('Stripe', 'setuptest', $params);
  $this->paymentProcessorID = $result['id'];
  $this->utils
    ->wf_civicrm_api('PaymentProcessor', 'create', [
    'id' => $this->paymentProcessorID,
    'is_test' => 0,
  ]);
  $this->utils
    ->wf_civicrm_api('Setting', 'create', [
    'stripe_nobillingaddress' => 1,
  ]);
  drupal_flush_all_caches();
}