ComunicAPI/tests/classes/models/BaseUniqueModelTest.php
2018-07-12 14:10:41 +02:00

20 lines
454 B
PHP

<?php
//Include class
require_once(__DIR__."/../../../classes/models/BaseUniqueObject.php");
use PHPUnit\Framework\TestCase;
class BaseUniqueObjectTest extends TestCase {
public function testValidObjectWithoutId(){
$obj = new BaseUniqueObject();
$obj->set_id(10);
$this->assertEquals(TRUE, $obj->isValid());
}
public function testInvalidObjectWithoutId(){
$obj = new BaseUniqueObject();
$this->assertEquals(FALSE, $obj->isValid());
}
}