Skip to content

Commit

Permalink
Improve
Browse files Browse the repository at this point in the history
  • Loading branch information
VincentLanglet committed Sep 17, 2022
1 parent 04602e4 commit c332e40
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions tests/Block/Breadcrumb/BreadcrumbTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -45,7 +39,6 @@ public function testBlockService(): void
{
$blockService = new BreadcrumbMenuBlockService_Test(
$this->createStub(Environment::class),
$this->createStub(EditableBlockServiceInterface::class),
$this->createStub(FactoryInterface::class)
);

Expand All @@ -58,7 +51,6 @@ public function testBlockExectute(): void

$blockService = new BreadcrumbMenuBlockService_Test(
$this->createStub(Environment::class),
$this->createStub(EditableBlockServiceInterface::class),
$menuFactory
);

Expand All @@ -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,
Expand Down

0 comments on commit c332e40

Please sign in to comment.