You are here

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

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

Tests that we can use the factory method to get a cached site.

File

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

Class

AcsfSiteTest
AcsfSiteTest.

Code

public function testFactoryLoadCache() {
  $site = AcsfSite::load();
  $this
    ->assertInstanceOf('\\Drupal\\acsf\\AcsfSite', $site);
  $cache = AcsfSite::load();
  $this
    ->assertSame($site, $cache);
  $this
    ->assertEquals($site->site_id, $cache->site_id);
}