API updadte
This commit is contained in:
29
tests/Entity/HeizungstypTest.php
Normal file
29
tests/Entity/HeizungstypTest.php
Normal file
@@ -0,0 +1,29 @@
|
||||
<?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());
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user