You are here

public function AcsfSiteTest::testAcsfSiteIsset in Acquia Cloud Site Factory Connector 8

Same name and namespace in other branches
  1. 8.2 tests/AcsfSiteTest.php \AcsfSiteTest::testAcsfSiteIsset()

Tests the __isset() method.

Test the public interface by first setting a value using the __set() method and assuring that it is available in the __get() method. Then test that the class property is set using isset().

File

tests/AcsfSiteTest.php, line 136
Provides PHPUnit tests for Acsf Site.

Class

AcsfSiteTest
AcsfSiteTest.

Code

public function testAcsfSiteIsset() {
  $site = new AcsfSite($this->site_id);
  $data = $this
    ->getTestData();
  foreach ($data as $type => $value) {
    $site
      ->__set($type, $value);
    $this
      ->assertSame($site
      ->__get($type), $value);
    $this
      ->assertTrue(isset($site->{$type}));
  }
}