From 2b9b216c04212555ed60e8dacf6e16b315ae6e3c Mon Sep 17 00:00:00 2001 From: Massimiliano Arione Date: Mon, 29 Apr 2024 11:06:40 +0200 Subject: [PATCH] fix tests --- phpstan-baseline.neon | 2 +- src/Twig/Extension/PaginationRuntime.php | 5 ++--- tests/DependencyInjection/ConfigurationTest.php | 1 + 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 0c47179..b60d22b 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -23,6 +23,6 @@ parameters: - message: "#^Parameter \\#1 \\$name of method Twig\\\\Environment\\:\\:render\\(\\) expects string\\|Twig\\\\TemplateWrapper, string\\|null given\\.$#" - count: 3 + count: 4 path: src/Twig/Extension/PaginationRuntime.php diff --git a/src/Twig/Extension/PaginationRuntime.php b/src/Twig/Extension/PaginationRuntime.php index 592f9ab..b1b08fa 100644 --- a/src/Twig/Extension/PaginationRuntime.php +++ b/src/Twig/Extension/PaginationRuntime.php @@ -50,8 +50,6 @@ public function rel_links( ?array $queryParams = [], ?array $viewParams = [], ): string { - dump($template ?: $pagination->getRelLinksTemplate()); - dump($this->processor->render($pagination, $queryParams ?? [], $viewParams ?? [])); return $env->render( $template ?: $pagination->getRelLinksTemplate(), $this->processor->render($pagination, $queryParams ?? [], $viewParams ?? []) @@ -99,7 +97,8 @@ public function sortable( public function filter( Environment $env, SlidingPaginationInterface $pagination, - array $fields, ?array $options = [], + array $fields, + ?array $options = [], ?array $params = [], ?string $template = null, ): string { diff --git a/tests/DependencyInjection/ConfigurationTest.php b/tests/DependencyInjection/ConfigurationTest.php index 23b0ab1..41281bc 100644 --- a/tests/DependencyInjection/ConfigurationTest.php +++ b/tests/DependencyInjection/ConfigurationTest.php @@ -73,6 +73,7 @@ public function testCustomConfig(): void 'pagination' => '@KnpPaginator/Pagination/foo.html.twig', 'filtration' => '@KnpPaginator/Pagination/bar.html.twig', 'sortable' => '@KnpPaginator/Pagination/baz.html.twig', + 'rel_links' => '@KnpPaginator/Pagination/rel_links.html.twig', ], 'page_range' => 15, 'page_limit' => 100,