Skip to content

Commit

Permalink
tests: testTranslationsMapExpection
Browse files Browse the repository at this point in the history
  • Loading branch information
didoda committed Feb 13, 2025
1 parent 9496a27 commit d8a453c
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions tests/TestCase/View/Helper/PropertyHelperTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -575,4 +575,21 @@ public function testTranslationsMap(): void
];
static::assertEquals($expected, $actual);
}

/**
* Test `translationsMap` with exception.
*
* @return void
* @covers ::translationsMap()
*/
public function testTranslationsMapExpection(): void
{
$properties = Configure::read('Properties');
Configure::write('Properties', 123);
$view = new View(null, null, null, []);
$helper = new PropertyHelper($view);
$actual = $helper->translationsMap();
static::assertEquals([], $actual);
Configure::write('Properties', $properties);
}
}

0 comments on commit d8a453c

Please sign in to comment.