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

Tests/Entity/RawHTMLPagePartTest.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\PagePartBundle\Tests\Entity;
3
use Kunstmaan\PagePartBundle\Entity\RawHTMLPagePart;
4
5
/**
6
 * Generated by PHPUnit_SkeletonGenerator on 2012-08-20 at 14:58:05.
7
 */
8 View Code Duplication
class RawHTMLPagePartTest 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...
9
{
10
    /**
11
     * @var RawHTMLPagePart
12
     */
13
    protected $object;
14
15
    /**
16
     * Sets up the fixture, for example, opens a network connection.
17
     * This method is called before a test is executed.
18
     */
19
    protected function setUp()
20
    {
21
        $this->object = new RawHTMLPagePart();
22
    }
23
24
    /**
25
     * Tears down the fixture, for example, closes a network connection.
26
     * This method is called after a test is executed.
27
     */
28
    protected function tearDown()
29
    {
30
    }
31
32
    /**
33
     * Generated from @assert () == "RawHTMLPagePart " . htmlentities($this->object->getContent()).
34
     *
35
     * @covers                Kunstmaan\PagePartBundle\Entity\RawHTMLPagePart::__toString
36
     */
37
    public function testToString()
38
    {
39
        $this->assertEquals("RawHTMLPagePart " . htmlentities($this->object->getContent()), $this->object->__toString());
40
    }
41
42
    /**
43
     * Generated from @assert () == 'KunstmaanPagePartBundle:RawHTMLPagePart:view.html.twig'.
44
     *
45
     * @covers                Kunstmaan\PagePartBundle\Entity\RawHTMLPagePart::getDefaultView
46
     */
47
    public function testGetDefaultView()
48
    {
49
        $this->assertEquals('KunstmaanPagePartBundle:RawHTMLPagePart:view.html.twig', $this->object->getDefaultView());
50
    }
51
52
    /**
53
     * @covers Kunstmaan\PagePartBundle\Entity\RawHTMLPagePart::setContent
54
     * @covers Kunstmaan\PagePartBundle\Entity\RawHTMLPagePart::getContent
55
     */
56
    public function testSetGetContent()
57
    {
58
        $this->object->setContent("tèst content with s3ç!àL");
59
        $this->assertEquals($this->object->getContent(), "tèst content with s3ç!àL");
60
    }
61
62
    /**
63
     * @covers Kunstmaan\PagePartBundle\Entity\RawHTMLPagePart::getDefaultAdminType
64
     */
65
    public function testGetDefaultAdminType()
66
    {
67
        $this->assertEquals('Kunstmaan\PagePartBundle\Form\RawHTMLPagePartAdminType', $this->object->getDefaultAdminType());
68
    }
69
}
70