30 lines
730 B
PHP
30 lines
730 B
PHP
<?php
|
|
|
|
namespace App\Tests\Entity;
|
|
|
|
use App\Entity\Heizungstyp;
|
|
use PHPUnit\Framework\TestCase;
|
|
|
|
class HeizungstypTest extends TestCase
|
|
{
|
|
public function testHeizungstypCreation(): void
|
|
{
|
|
$heizungstyp = new Heizungstyp();
|
|
$heizungstyp->setName('Wärmepumpe');
|
|
|
|
$this->assertEquals('Wärmepumpe', $heizungstyp->getName());
|
|
}
|
|
|
|
public function testCommonHeizungstypen(): void
|
|
{
|
|
$typen = ['Gasheizung', 'Wärmepumpe', 'Ölheizung', 'Fernwärme', 'Pelletheizung'];
|
|
|
|
foreach ($typen as $typName) {
|
|
$heizungstyp = new Heizungstyp();
|
|
$heizungstyp->setName($typName);
|
|
|
|
$this->assertEquals($typName, $heizungstyp->getName());
|
|
}
|
|
}
|
|
}
|