Skip to content
Snippets Groups Projects
Commit 7b2989c4 authored by project update bot's avatar project update bot Committed by Daniel Cothran
Browse files

Issue #3434989 by Project Update Bot, andileco: Automated Drupal 11...

Issue #3434989 by Project Update Bot, andileco: Automated Drupal 11 compatibility fixes for tid_to_name
parent e4160579
No related branches found
No related tags found
1 merge request!4Automated Project Update Bot fixes
Pipeline #137966 passed with warnings
......@@ -57,7 +57,7 @@ class TidToNameTwigExtension extends AbstractExtension {
*/
public function getFunctions(): array {
return [
new TwigFunction('tn', [$this, 'getTermNameByTid']),
new TwigFunction('tn', $this->getTermNameByTid(...)),
];
}
......
......@@ -93,8 +93,7 @@ class TidToNameTwigExtensionTest extends TestCase {
->willReturn($this->mockedLanguage);
// Create a mock of EntityRepositoryInterface and use the returnCallback.
$this->entityRepository = $this->getMockBuilder(EntityRepositoryInterface::class)
->getMock();
$this->entityRepository = $this->createMock(EntityRepositoryInterface::class);
$this->entityRepository->method('getTranslationFromContext')
->will($this->returnCallback(
function ($term) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment