From c332e40453290d317f949bdd4d11224bc44031a8 Mon Sep 17 00:00:00 2001 From: Vincent Langlet Date: Sat, 17 Sep 2022 12:40:01 +0200 Subject: [PATCH] Improve --- tests/Block/Breadcrumb/BreadcrumbTest.php | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/tests/Block/Breadcrumb/BreadcrumbTest.php b/tests/Block/Breadcrumb/BreadcrumbTest.php index 1450a180..dd93f2f4 100644 --- a/tests/Block/Breadcrumb/BreadcrumbTest.php +++ b/tests/Block/Breadcrumb/BreadcrumbTest.php @@ -16,18 +16,12 @@ use Knp\Menu\FactoryInterface; use Knp\Menu\ItemInterface; use Sonata\BlockBundle\Block\BlockContext; -use Sonata\BlockBundle\Block\Service\BlockServiceInterface; -use Sonata\BlockBundle\Block\Service\EditableBlockService; use Sonata\BlockBundle\Model\Block; use Sonata\BlockBundle\Test\BlockServiceTestCase; use Sonata\SeoBundle\Block\Breadcrumb\BaseBreadcrumbMenuBlockService; use Symfony\Component\HttpFoundation\Response; use Twig\Environment; -interface EditableBlockServiceInterface extends BlockServiceInterface, EditableBlockService -{ -} - final class BreadcrumbMenuBlockService_Test extends BaseBreadcrumbMenuBlockService { public function handleContext(string $context): bool @@ -45,7 +39,6 @@ public function testBlockService(): void { $blockService = new BreadcrumbMenuBlockService_Test( $this->createStub(Environment::class), - $this->createStub(EditableBlockServiceInterface::class), $this->createStub(FactoryInterface::class) ); @@ -58,7 +51,6 @@ public function testBlockExectute(): void $blockService = new BreadcrumbMenuBlockService_Test( $this->createStub(Environment::class), - $this->createStub(EditableBlockServiceInterface::class), $menuFactory ); @@ -79,14 +71,22 @@ public function testDefaultSettings(): void { $blockService = new BreadcrumbMenuBlockService_Test( $this->createStub(Environment::class), - $this->createStub(EditableBlockServiceInterface::class), $this->createStub(FactoryInterface::class) ); $blockContext = $this->getBlockContext($blockService); $this->assertSettings([ - 'template' => null, + 'title' => '', + 'cache_policy' => 'public', + 'template' => '@SonataBlock/Block/block_core_menu.html.twig', + 'safe_labels' => false, + 'current_class' => 'active', + 'first_class' => false, + 'last_class' => false, + 'current_uri' => null, + 'menu_class' => 'list-group', + 'children_class' => 'list-group-item', 'menu_template' => '@SonataSeo/Block/breadcrumb.html.twig', 'include_homepage_link' => true, 'context' => null,