File tree Expand file tree Collapse file tree 1 file changed +2
-15
lines changed
Expand file tree Collapse file tree 1 file changed +2
-15
lines changed Original file line number Diff line number Diff line change @@ -32,9 +32,9 @@ Given the following block service::
3232
3333You can write unit tests for block services with the following code::
3434
35- use Sonata\BlockBundle\Test\AbstractBlockServiceTestCase ;
35+ use Sonata\BlockBundle\Test\BlockServiceTestCase ;
3636
37- class CustomBlockServiceTest extends AbstractBlockServiceTestCase
37+ class CustomBlockServiceTest extends BlockServiceTestCase
3838 {
3939 public function testDefaultSettings(): void
4040 {
@@ -47,17 +47,4 @@ You can write unit tests for block services with the following code::
4747 'template' => false,
4848 ], $blockContext);
4949 }
50-
51- public function testExecute(): void
52- {
53- $blockService = new CustomBlockService('foo', $this->twig);
54- $blockContext = $this->getBlockContext($blockService);
55-
56- $blockService->execute($blockContext);
57-
58- $this->assertSame($blockContext, $this->templating->parameters['context']);
59- $this->assertInternalType('array', $this->templating->parameters['settings']);
60- $this->assertInstanceOf('Sonata\BlockBundle\Model\BlockInterface', $this->templating->parameters['block']);
61- $this->assertSame('bar', $this->templating->parameters['foo']);
62- }
6350 }
You can’t perform that action at this time.
0 commit comments