Skip to content

Commit b34cff3

Browse files
committed
[Map] Remove test for render_map deprecation
1 parent e5f51fe commit b34cff3

File tree

1 file changed

+0
-37
lines changed

1 file changed

+0
-37
lines changed

src/Map/tests/Twig/MapExtensionTest.php

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -50,43 +50,6 @@ public function testRuntimeIsRegistered(): void
5050
$this->assertInstanceOf(MapRuntime::class, $twig->getRuntime(MapRuntime::class));
5151
}
5252

53-
/**
54-
* @group legacy
55-
*/
56-
public function testRenderFunctionIsDeprecated(): void
57-
{
58-
$map = (new Map())
59-
->center(new Point(latitude: 5, longitude: 10))
60-
->zoom(4);
61-
62-
$renderer = self::createMock(RendererInterface::class);
63-
$renderer
64-
->expects(self::once())
65-
->method('renderMap')
66-
->with($map, [])
67-
->willReturn('<map/>')
68-
;
69-
self::getContainer()->set('test.ux_map.renderers', $renderer);
70-
71-
/** @var Environment $twig */
72-
$twig = self::getContainer()->get('twig');
73-
$twig->setLoader(new ChainLoader([
74-
new ArrayLoader([
75-
'test' => '{{ render_map(map) }}',
76-
]),
77-
$twig->getLoader(),
78-
]));
79-
80-
if (class_exists(DeprecatedCallableInfo::class)) {
81-
$this->expectDeprecation('Since symfony/ux-map 2.20: Twig Function "render_map" is deprecated; use "ux_map" instead in test at line 1.');
82-
} else {
83-
$this->expectDeprecation('Twig Function "render_map" is deprecated since version 2.20. Use "ux_map" instead in test at line 1.');
84-
}
85-
86-
$html = $twig->render('test', ['map' => $map]);
87-
$this->assertSame('<map/>', $html);
88-
}
89-
9053
public function testMapFunctionWithArray(): void
9154
{
9255
$map = (new Map())

0 commit comments

Comments
 (0)