initial commit
This commit is contained in:
parent
78a1f353af
commit
5d6a0b426a
27
tests/Unit/Repository/NameserverRepositoryTest.php
Normal file
27
tests/Unit/Repository/NameserverRepositoryTest.php
Normal 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());
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user