infinito/application/tests/unit/Entity/Source/NameSourceTest.php

32 lines
649 B
PHP
Raw Normal View History

2018-10-28 22:43:35 +01:00
<?php
2018-10-29 19:01:00 +01:00
2018-10-28 22:43:35 +01:00
namespace tests\unit\Entity\Source;
use PHPUnit\Framework\TestCase;
use App\Entity\Source\NameSourceInterface;
use App\Entity\Source\NameSource;
/**
* @author kevinfrantz
*/
class NameSourceTest extends TestCase
{
/**
* @var NameSourceInterface
*/
protected $nameSource;
public function setUp(): void
{
$this->nameSource = new NameSource();
}
2018-10-29 19:01:00 +01:00
public function testName(): void
{
2018-10-28 22:43:35 +01:00
$this->assertEquals('', $this->nameSource->getName());
$name = 'Hello World!';
$this->nameSource->setName($name);
$this->assertEquals($name, $this->nameSource->getName());
}
}