You are here

public function ApiProductTest::testSetEnvironments in Apigee Edge 8

Test setting environments.

File

tests/src/Unit/Entity/ApiProductTest.php, line 72

Class

ApiProductTest
Test ApiProductTest class.

Namespace

Drupal\Tests\apigee_edge\Unit\Entity

Code

public function testSetEnvironments() {
  $environments_expected = [
    'environment1',
    'environment2',
  ];
  $this->apiProduct
    ->setEnvironments(...$environments_expected);
  $environments_actual = $this->apiProduct
    ->getEnvironments();
  $this
    ->assertArrayEquals($environments_expected, $environments_actual);
}