initial commit

This commit is contained in:
tracer 2022-10-08 10:52:03 +02:00
parent 78a1f353af
commit 5d6a0b426a
1 changed files with 27 additions and 0 deletions

View File

@ -0,0 +1,27 @@
<?php
namespace Unit\Repository;
use App\Entity\Nameserver;
use Unit\Controller\BindApiControllerTest;
/**
*
*/
class NameserverRepositoryTest extends BindApiControllerTest
{
/**
*/
public function testInsert()
{
$nameserver = new Nameserver(name: 'inserttest.org', a: '1.2.3.4', aaaa: '1bad::babe');
$this->nameserverRepository->insert(nameserver: $nameserver);
$nameserverTest = $this->nameserverRepository->findByName(name: 'inserttest.org');
$this->assertIsNotBool(actual: $nameserver);
$this->assertEquals(expected: 'inserttest.org', actual: $nameserverTest->getName());
// clean up
$this->nameserverRepository->delete(id: $nameserverTest->getId());
}
}