public function ContentEntityNormalizerTest::testGetBaseRoot in Acquia Content Hub 8
Test the getBaseRoot function.
@covers ::getBaseRoot
File
- tests/
src/ Unit/ Normalizer/ ContentEntityNormalizerTest.php, line 209
Class
- ContentEntityNormalizerTest
- PHPUnit test for the ContentEntityNormalizer class.
Namespace
Drupal\Tests\acquia_contenthub\Unit\NormalizerCode
public function testGetBaseRoot() {
// With the global set.
$GLOBALS['base_root'] = 'test';
$this
->assertEquals('test', $this->contentEntityNormalizer
->getBaseRoot());
unset($GLOBALS['base_root']);
// Without the global set.
$this
->assertEquals('', $this->contentEntityNormalizer
->getBaseRoot());
}