Completed
Pull Request — master (#1119)
by Alessandro
06:26
created

PersistenceRepositoryTest   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A testRepositoryShouldBeSetCorrectly() 0 10 1
A setUp() 0 6 1
A tearDown() 0 6 1
1
<?php
2
3
namespace FOS\ElasticaBundle\Tests\Functional;
4
5
class PersistenceRepositoryTest extends WebTestCase
6
{
7
    public function testRepositoryShouldBeSetCorrectly()
8
    {
9
        $client = $this->createClient(array('test_case' => 'ORM'));
10
11
        $repository = $client->getContainer()->get('fos_elastica.manager.orm')
12
            ->getRepository('FOS\ElasticaBundle\Tests\Functional\TypeObject');
13
14
        $this->assertNotNull($repository);
15
        $this->assertEquals('FOS\ElasticaBundle\Tests\Functional\TypeObjectRepository', get_class($repository));
16
    }
17
18
    protected function setUp()
19
    {
20
        parent::setUp();
21
22
        $this->deleteTmpDir('Basic');
23
    }
24
25
    protected function tearDown()
26
    {
27
        parent::tearDown();
28
29
        $this->deleteTmpDir('Basic');
30
    }
31
}