mirror of
https://github.com/pierre42100/ComunicAPI
synced 2024-12-04 19:24:16 +00:00
20 lines
454 B
PHP
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());
|
||
|
}
|
||
|
}
|