public function ConnectTest::setUp in Commerce Square Connect 8
Overrides KernelTestBase::setUp
File
- tests/src/ Kernel/ ConnectTest.php, line 22 
Class
- ConnectTest
- Tests the Connect service to act as application configuration.
Namespace
Drupal\Tests\commerce_square\KernelCode
public function setUp() : void {
  parent::setUp();
  $this->container
    ->get('config.factory')
    ->getEditable('commerce_square.settings')
    ->set('app_name', 'Testing')
    ->set('app_secret', 'Test secret')
    ->set('sandbox_app_id', 'sandbox-sq0idp-nV_lBSwvmfIEF62s09z0-Q')
    ->set('sandbox_access_token', 'sandbox-sq0atb-uEZtx4_Qu36ff-kBTojVNw')
    ->set('production_app_id', 'live-sq0idp')
    ->save();
  $this->container
    ->get('state')
    ->set('commerce_square.production_access_token', 'TESTTOKEN');
  $this->container
    ->get('state')
    ->set('commerce_square.production_access_token_expiry', $this->container
    ->get('datetime.time')
    ->getRequestTime());
}