Completed
Push — master ( 91fdab...75a7b9 )
by
unknown
13:37
created

AbstractEntityTest   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A setUp() 0 4 1
A testGetSetId() 0 5 1
A test__toString() 0 5 1
1
<?php
2
3
namespace Kunstmaan\AdminBundle\Tests\Entity;
4
5
use Kunstmaan\AdminBundle\Entity\AbstractEntity;
6
7
/**
8
 * Generated by PHPUnit_SkeletonGenerator on 2012-09-21 at 08:00:57.
9
 */
10
class AbstractEntityTest extends \PHPUnit_Framework_TestCase
11
{
12
    /**
13
     * @var AbstractEntity
14
     */
15
    protected $object;
16
17
    /**
18
     * Sets up the fixture, for example, opens a network connection.
19
     * This method is called before a test is executed.
20
     */
21
    protected function setUp()
22
    {
23
        $this->object = $this->getMockForAbstractClass('Kunstmaan\AdminBundle\Entity\AbstractEntity');
0 ignored issues
show
Documentation Bug introduced by
It seems like $this->getMockForAbstrac...ntity\\AbstractEntity') of type object<PHPUnit_Framework_MockObject_MockObject> is incompatible with the declared type object<Kunstmaan\AdminBu...\Entity\AbstractEntity> of property $object.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
24
    }
25
26
    public function testGetSetId()
27
    {
28
        $this->object->setId(5);
29
        $this->assertEquals(5, $this->object->getId());
30
    }
31
32
    public function test__toString()
33
    {
34
        $this->object->setId(8);
35
        $this->assertEquals("8", $this->object->__toString());
36
    }
37
}
38