Completed
Push — 2.x-dev-kit ( 971030 )
by
unknown
07:52
created

BreadcrumbTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
c 1
b 0
f 0
lcom 0
cbo 2
dl 0
loc 15
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A testBlockService() 0 12 1
1
<?php
2
3
/*
4
 * This file is part of the Sonata Project package.
5
 *
6
 * (c) Thomas Rabaix <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Sonata\SeoBundle\Tests\Block\Breadcrumb;
13
14
use Sonata\SeoBundle\Block\Breadcrumb\BaseBreadcrumbMenuBlockService;
15
use Sonata\SeoBundle\Tests\Block\BaseBlockTest;
16
17
class BreadcrumbMenuBlockService_Test extends BaseBreadcrumbMenuBlockService
0 ignored issues
show
Coding Style introduced by
This class is not in CamelCase format.

Classes in PHP are usually named in CamelCase.

In camelCase names are written without any punctuation, the start of each new word being marked by a capital letter. The whole name starts with a capital letter as well.

Thus the name database provider becomes DatabaseProvider.

Loading history...
18
{
19
}
20
21
/**
22
 * @author Sylvain Deloux <[email protected]>
23
 */
24
class BreadcrumbTest extends BaseBlockTest
0 ignored issues
show
Coding Style Compatibility introduced by
PSR1 recommends that each class should be in its own file to aid autoloaders.

Having each class in a dedicated file usually plays nice with PSR autoloaders and is therefore a well established practice. If you use other autoloaders, you might not want to follow this rule.

Loading history...
25
{
26
    public function testBlockService()
27
    {
28
        $blockService = new BreadcrumbMenuBlockService_Test(
29
            'context',
30
            'name',
31
            $this->getMock('Symfony\Bundle\FrameworkBundle\Templating\EngineInterface'),
32
            $this->getMock('Knp\Menu\Provider\MenuProviderInterface'),
33
            $this->getMock('Knp\Menu\FactoryInterface')
34
        );
35
36
        $this->assertTrue($blockService->handleContext('context'));
37
    }
38
}
39