DoctrineUnitOfWorkTest   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A testCreatePhpCode() 0 4 1
A testConstructPhpCode() 0 4 1
1
<?php
2
3
namespace steevanb\DoctrineEvents\Tests;
4
5
use Doctrine\ORM\EntityManager;
6
7
class DoctrineUnitOfWorkTest extends \PHPUnit_Framework_TestCase
8
{
9
    use AssertPhpCodeTrait;
10
11
    /**
12
     * Compare doctrine EntityManager::create() code with code was copied into
13
     * steevanb\DoctrineEvents\Doctrine\ORM\EntityManager
14
     * Works for Doctrine 2.5.0, 2.5.1, 2.5.2, 2.5.3, 2.5.4, 2.5.5, and maybe next releases
15
     */
16
    public function testCreatePhpCode()
17
    {
18
        $this->assertPhpCode(EntityManager::class, 'create', 'DoctrineEntityManagerCreatePhpCode.txt');
19
    }
20
21
    /**
22
     * Compare doctrine EntityManager::__construct() code with code was copied into
23
     * steevanb\DoctrineEvents\Doctrine\ORM\EntityManager
24
     * Works for Doctrine 2.5.0, 2.5.1, 2.5.2, 2.5.3, 2.5.4, 2.5.5, and maybe next releases
25
     */
26
    public function testConstructPhpCode()
27
    {
28
        $this->assertPhpCode(EntityManager::class, '__construct', 'DoctrineEntityManagerConstructPhpCode.txt');
29
    }
30
}
31