Completed
Pull Request — 5.0 (#2066)
by Jeroen
31:48 queued 20:01
created

PagePartBundle/Tests/Entity/TextPagePartTest.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\TextPagePart;
4
5
/**
6
 * Generated by PHPUnit_SkeletonGenerator on 2012-08-20 at 14:42:49.
7
 */
8 View Code Duplication
class TextPagePartTest 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 TextPagePart
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 TextPagePart();
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
     * @covers Kunstmaan\PagePartBundle\Entity\TextPagePart::setContent
34
     * @covers Kunstmaan\PagePartBundle\Entity\TextPagePart::getContent
35
     */
36
    public function testSetGetContent()
37
    {
38
        $this->object->setContent("tèst content with s3ç!àL");
39
        $this->assertEquals($this->object->getContent(), "tèst content with s3ç!àL");
40
    }
41
42
    /**
43
     * Generated from @assert () == "TextPagePart " . $this->object->getContent().
44
     *
45
     * @covers                Kunstmaan\PagePartBundle\Entity\TextPagePart::__toString
46
     */
47
    public function testToString()
48
    {
49
        $this->assertEquals("TextPagePart " . $this->object->getContent(), $this->object->__toString());
50
    }
51
52
    /**
53
     * Generated from @assert () == 'KunstmaanPagePartBundle:TextPagePart:view.html.twig'.
54
     *
55
     * @covers                Kunstmaan\PagePartBundle\Entity\TextPagePart::getDefaultView
56
     */
57
    public function testGetDefaultView()
58
    {
59
        $this->assertEquals('KunstmaanPagePartBundle:TextPagePart:view.html.twig', $this->object->getDefaultView());
60
    }
61
62
    /**
63
     * @covers Kunstmaan\PagePartBundle\Entity\TextPagePart::getDefaultAdminType
64
     */
65
    public function testGetDefaultAdminType()
66
    {
67
        $this->assertEquals('Kunstmaan\PagePartBundle\Form\TextPagePartAdminType', $this->object->getDefaultAdminType());
68
    }
69
}
70