Completed
Push — master ( 92d22d...deb388 )
by Sander
107:16 queued 92:13
created

SeoBundle/Tests/unit/Entity/RobotsTest.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
3
namespace Kunstmaan\SeoBundle\Tests\Entity;
4
5
use Kunstmaan\SeoBundle\Entity\Robots;
6
use Kunstmaan\SeoBundle\Form\RobotsType;
7
use PHPUnit\Framework\TestCase;
8
9
/**
10
 * Class RobotsTest
11
 */
12 View Code Duplication
class RobotsTest extends 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...
13
{
14
    /**
15
     * @var Robots
16
     */
17
    protected $object;
18
19
    /**
20
     * Sets up the fixture, for example, opens a network connection.
21
     * This method is called before a test is executed.
22
     */
23
    protected function setUp()
24
    {
25
        $this->object = new Robots();
26
    }
27
28
    public function testGettersSetters()
29
    {
30
        $this->object->setId(11);
31
        $this->object->setRobotsTxt('*');
32
33
        $this->assertEquals(11, $this->object->getId());
34
        $this->assertEquals('*', $this->object->getRobotsTxt());
35
        $this->assertEquals(RobotsType::class, $this->object->getDefaultAdminType());
36
        $this->assertEquals('Robots', $this->object->__toString());
37
    }
38
}
39