Skip to content

Commit 5231f5f

Browse files
committed
minor #2755 [Map] Remove test for render_map deprecation (Kocal)
This PR was merged into the 2.x branch. Discussion ---------- [Map] Remove test for `render_map` deprecation | Q | A | ------------- | --- | Bug fix? | no | New feature? | no <!-- please update src/**/CHANGELOG.md files --> | Docs? | no <!-- required for new features --> | Issues | Fix #... <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead --> | License | MIT <!-- Replace this notice by a description of your feature/bugfix. This will help reviewers and should be a good start for the documentation. Additionally (see https://symfony.com/releases): - Always add tests and ensure they pass. - For new features, provide some code snippets to help understand usage. - Features and deprecations must be submitted against branch main. - Update/add documentation as required (we can help!) - Changelog entry should follow https://symfony.com/doc/current/contributing/code/conventions.html#writing-a-changelog-entry - Never break backward compatibility (see https://symfony.com/bc). --> Commits ------- ca51192 [Map] Remove test for `render_map` deprecation
2 parents e5f51fe + ca51192 commit 5231f5f

File tree

1 file changed

+0
-40
lines changed

1 file changed

+0
-40
lines changed

src/Map/tests/Twig/MapExtensionTest.php

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,7 @@
1919
use Symfony\UX\Map\Tests\Kernel\TwigAppKernel;
2020
use Symfony\UX\Map\Twig\MapExtension;
2121
use Symfony\UX\Map\Twig\MapRuntime;
22-
use Twig\DeprecatedCallableInfo;
2322
use Twig\Environment;
24-
use Twig\Loader\ArrayLoader;
25-
use Twig\Loader\ChainLoader;
2623

2724
class MapExtensionTest extends KernelTestCase
2825
{
@@ -50,43 +47,6 @@ public function testRuntimeIsRegistered(): void
5047
$this->assertInstanceOf(MapRuntime::class, $twig->getRuntime(MapRuntime::class));
5148
}
5249

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-
9050
public function testMapFunctionWithArray(): void
9151
{
9252
$map = (new Map())

0 commit comments

Comments
 (0)