Completed
Pull Request — master (#485)
by Maximilian
04:14
created

TreeBrowserTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setUp() 0 5 1
A testTreeOnDashboardLoadsWithNoErrors() 0 10 1
1
<?php
2
3
namespace Sonata\DoctrinePHPCRAdminBundle\Tests\WebTest\Dashboard;
4
5
use Symfony\Cmf\Component\Testing\Functional\BaseTestCase;
6
7
/**
8
 * @author Maximilian Berghoff <[email protected]>
9
 */
10
class TreeBrowserTest extends BaseTestCase
11
{
12
    public function setUp()
13
    {
14
        $this->db('PHPCR')->loadFixtures(array('Sonata\DoctrinePHPCRAdminBundle\Tests\Resources\DataFixtures\Phpcr\LoadDashboardTreeData'));
15
        $this->client = $this->createClient();
16
    }
17
18
    public function testTreeOnDashboardLoadsWithNoErrors()
19
    {
20
21
        $crawler = $this->client->request('GET', '/admin/dashboard');
22
        $res = $this->client->getResponse();
23
24
        $this->assertResponseSuccess($res);
25
26
        $this->assertCount(1, $crawler->filter('div#tree'));
27
    }
28
}
29