You are here

protected function CorsResponseEventSubscriberTest::setUp in farmOS 2.x

Overrides FarmBrowserTestBase::setUp

File

modules/core/api/tests/src/Functional/CorsResponseEventSubscriberTest.php, line 38

Class

CorsResponseEventSubscriberTest
Tests that CORS headers are properly added.

Namespace

Drupal\Tests\farm_api\Functional

Code

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

  // Create a consumer for testing.
  $this->consumer = Consumer::create([
    'label' => $this
      ->getRandomGenerator()
      ->name(),
  ]);
  $this->consumer
    ->save();
}