Completed
Pull Request — 5.1 (#2334)
by Jeroen
11:41 queued 55s
created

testInstantiatingClassDeprecation()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace Kunstmaan\ArticleBundle\Tests\Entity;
4
5
use Kunstmaan\ArticleBundle\Entity\AbstractAuthor;
6
use PHPUnit_Framework_TestCase;
7
8
/**
9
 * Generated by PHPUnit_SkeletonGenerator on 2012-09-04 at 16:54:04.
10
 */
11
class AbstractAuthorTest extends PHPUnit_Framework_TestCase
12
{
13
    /**
14
     * @group legacy
15
     * @expectedDeprecation Instantiating the "Kunstmaan\ArticleBundle\Entity\AbstractAuthor" class is deprecated in KunstmaanArticleBundle 5.1 and will be made abstract in KunstmaanArticleBundle 6.0. Extend your implementation from this class instead.
16
     */
17
    public function testInstantiatingClassDeprecation()
18
    {
19
        new AbstractAuthor();
20
    }
21
22
    public function testGettersAndSetters()
23
    {
24
        $entity = new AbstractAuthor();
25
        $entity->setId(666);
26
        $entity->setLink('https://nasa.gov');
27
        $entity->setName('NASA');
28
29
        $this->assertEquals(666, $entity->getId());
30
        $this->assertEquals('https://nasa.gov', $entity->getLink());
31
        $this->assertEquals('NASA', $entity->getName());
32
        $this->assertEquals('NASA', $entity->__toString());
33
    }
34
}
35