$elements =
$this->
findTip([ 'id' => 'tour-test-1',
'title' => 'The first tip',
]);
$this->
assertCount(1,
$elements, 'Found English variant of tip 1.'
);
$elements =
$this->
findTip([ 'id' => 'tour-test-2',
'title' => 'The quick brown fox',
]);
$this->
assertNotCount(1,
$elements, 'Did not find English variant of tip 2.'
);
$elements =
$this->
findTip([ 'id' => 'tour-test-1',
'title' => 'La pioggia cade in spagna',
]);
$this->
assertNotCount(1,
$elements, 'Did not find Italian variant of tip 1.'
);
// Ensure that plugins work.
$elements =
[];
foreach ($tips as $tip) { if (str_contains($tip['body'
], 'http://local/image.png'
)) {