2019-03-22 20:58:38 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
/*
|
|
|
|
* This file is part of the Kimai time-tracking app.
|
|
|
|
*
|
|
|
|
* For the full copyright and license information, please view the LICENSE
|
|
|
|
* file that was distributed with this source code.
|
|
|
|
*/
|
|
|
|
|
|
|
|
namespace App\Tests\Entity;
|
|
|
|
|
|
|
|
use App\Entity\Configuration;
|
2019-06-11 13:18:57 +02:00
|
|
|
use PHPUnit\Framework\TestCase;
|
2019-03-22 20:58:38 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @covers \App\Entity\Configuration
|
|
|
|
*/
|
2019-06-11 13:18:57 +02:00
|
|
|
class ConfigurationTest extends TestCase
|
2019-03-22 20:58:38 +01:00
|
|
|
{
|
2024-02-07 23:47:25 +01:00
|
|
|
public function testDefaultValues(): void
|
2019-03-22 20:58:38 +01:00
|
|
|
{
|
|
|
|
$sut = new Configuration();
|
|
|
|
$this->assertNull($sut->getId());
|
|
|
|
$this->assertNull($sut->getName());
|
|
|
|
$this->assertNull($sut->getValue());
|
|
|
|
}
|
|
|
|
|
2024-02-07 23:47:25 +01:00
|
|
|
public function testSetterAndGetter(): void
|
2019-03-22 20:58:38 +01:00
|
|
|
{
|
|
|
|
$sut = new Configuration();
|
|
|
|
$this->assertInstanceOf(Configuration::class, $sut->setName('foo-bar'));
|
|
|
|
$this->assertEquals('foo-bar', $sut->getName());
|
|
|
|
$this->assertInstanceOf(Configuration::class, $sut->setValue('hello world'));
|
|
|
|
$this->assertEquals('hello world', $sut->getValue());
|
|
|
|
}
|
|
|
|
}
|