Completed
Push — master ( eb83f4...bb238e )
by Maximilian
14s
created

testTreeOnDashboardLoadsWithNoErrors()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 9
rs 9.6666
c 0
b 0
f 0
cc 1
eloc 5
nc 1
nop 0
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\LoadTreeData'));
15
        $this->client = $this->createClient();
16
    }
17
18
    public function testTreeOnDashboardLoadsWithNoErrors()
19
    {
20
        $crawler = $this->client->request('GET', '/admin/dashboard');
21
        $res = $this->client->getResponse();
22
23
        $this->assertResponseSuccess($res);
24
25
        $this->assertCount(1, $crawler->filter('div#tree'));
26
    }
27
}
28