private function PageContextTest::testGetAllWithSetByNodeSetUpFields in Acquia Lift Connector 8
testGetAllWithSetByNode(), sub routine "setup fields".
1 call to PageContextTest::testGetAllWithSetByNodeSetUpFields()
- PageContextTest::testGetAllWithSetByNode in tests/
src/ Unit/ Service/ Context/ PageContextTest.php - Tests the getAll() method, with setByNode().
File
- tests/
src/ Unit/ Service/ Context/ PageContextTest.php, line 273 - Contains \Drupal\Tests\acquia_lift\Service\Context\PageContextTest.
Class
- PageContextTest
- PageContextTest Test.
Namespace
Drupal\Tests\acquia_lift\Service\ContextCode
private function testGetAllWithSetByNodeSetUpFields() {
$tracked_content_term_1 = $this
->getTerm('Tracked Content Term Name 1', 'tracked_content_vocabulary');
$tracked_keyword_term_1 = $this
->getTerm('Tracked Keyword Term Name 1', 'tracked_keyword_vocabulary');
$tracked_keyword_term_2 = $this
->getTerm('Tracked Keyword Term Name 2', 'tracked_keyword_vocabulary');
$discarded_term_1 = $this
->getTerm('Untracked Term Name', 'untracked_vocabulary_id');
$terms = [
90210 => [
$tracked_content_term_1,
$tracked_keyword_term_1,
$tracked_keyword_term_2,
$discarded_term_1,
],
];
$this->taxonomyTermStorage
->expects($this
->once())
->method('getNodeTerms')
->with([
90210,
])
->willReturn($terms);
}