Completed
Pull Request — 5.0 (#2067)
by Jeroen
31:56 queued 20:07
created

Tests/Entity/VideoPagePartTest.php (1 issue)

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<?php
2
namespace Kunstmaan\MediaPagePartBundle\Tests\Entity;
3
4
use Kunstmaan\MediaBundle\Entity\Media;
5
6
use Kunstmaan\MediaPagePartBundle\Entity\VideoPagePart;
7
8
use Kunstmaan\MediaPagePartBundle\Form\VideoPagePartAdminType;
9
10
/**
11
 * Generated by PHPUnit_SkeletonGenerator on 2012-10-01 at 11:05:56.
12
 */
13 View Code Duplication
class VideoPagePartTest extends \PHPUnit_Framework_TestCase
0 ignored issues
show
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
14
{
15
    /**
16
     * @var VideoPagePart
17
     */
18
    protected $object;
19
20
    /**
21
     * Sets up the fixture, for example, opens a network connection.
22
     * This method is called before a test is executed.
23
     */
24
    protected function setUp()
25
    {
26
        $this->object = new VideoPagePart;
27
    }
28
29
    /**
30
     * @covers Kunstmaan\MediaPagePartBundle\Entity\VideoPagePart::setMedia
31
     * @covers Kunstmaan\MediaPagePartBundle\Entity\VideoPagePart::getMedia
32
     */
33
    public function testSetGetMedia()
34
    {
35
        $media = new Media();
36
        $media->setId(5);
37
        $this->object->setMedia($media);
38
        $this->assertEquals(5, $this->object->getMedia()->getId());
39
    }
40
41
    /**
42
     * @covers Kunstmaan\MediaPagePartBundle\Entity\VideoPagePart::getDefaultView
43
     */
44
    public function testGetDefaultView()
45
    {
46
        $defaultView = $this->object->getDefaultView();
47
        $this->assertEquals("KunstmaanMediaPagePartBundle:VideoPagePart:view.html.twig", $defaultView);
48
    }
49
50
    /**
51
     * @covers Kunstmaan\MediaPagePartBundle\Entity\VideoPagePart::getDefaultAdminType
52
     */
53
    public function testGetDefaultAdminType()
54
    {
55
        $this->assertEquals(VideoPagePartAdminType::class, $this->object->getDefaultAdminType());
56
    }
57
}
58