public function PageContextTest::testGetAll in Acquia Lift Connector 8
Tests the getAll() method().
@covers ::getAll
File
- tests/
src/ Unit/ Service/ Context/ PageContextTest.php, line 84 - Contains \Drupal\Tests\acquia_lift\Service\Context\PageContextTest.
Class
- PageContextTest
- PageContextTest Test.
Namespace
Drupal\Tests\acquia_lift\Service\ContextCode
public function testGetAll() {
$page_context = new PageContext($this->configFactory, $this->entityTypeManager);
$all_page_context = $page_context
->getAll();
$expected_page_context = [
'content_title' => 'Untitled',
'content_type' => 'page',
'page_type' => 'content page',
'content_section' => '',
'content_keywords' => '',
'post_id' => '',
'published_date' => '',
'thumbnail_url' => '',
'persona' => '',
'engagement_score' => 1,
'author' => '',
'evalSegments' => TRUE,
'trackingId' => '',
];
$this
->assertEquals($expected_page_context, $all_page_context);
}