Fixed phpUnit test

This commit is contained in:
2026-06-19 17:14:44 +00:00
parent b2a2dc9d5e
commit 56342e2418
2 changed files with 4 additions and 3 deletions
-1
View File
@@ -7,7 +7,6 @@
convertWarningsToExceptions="true" convertWarningsToExceptions="true"
processIsolation="false" processIsolation="false"
stopOnFailure="false" stopOnFailure="false"
syntaxCheck="false"
bootstrap="./tests/bootstrap.php"> bootstrap="./tests/bootstrap.php">
<testsuites> <testsuites>
<testsuite name="Default"> <testsuite name="Default">
+4 -2
View File
@@ -3,8 +3,9 @@
namespace CloudObjects\PhpMAE; namespace CloudObjects\PhpMAE;
use ML\IRI\IRI; use ML\IRI\IRI;
use PHPUnit\Framework\TestCase;
class ClassValidatorTest extends \PHPUnit_Framework_TestCase { class ClassValidatorTest extends TestCase {
private $validator; private $validator;
@@ -12,11 +13,12 @@ class ClassValidatorTest extends \PHPUnit_Framework_TestCase {
return file_get_contents(__DIR__.'/fixtures/'.$filename); return file_get_contents(__DIR__.'/fixtures/'.$filename);
} }
protected function setUp() { protected function setUp(): void {
$this->validator = new ClassValidator; $this->validator = new ClassValidator;
} }
public function testValidate() { public function testValidate() {
$this->addToAssertionCount(1);
$this->validator->validate($this->loadFromFile('class1.php'), $this->validator->validate($this->loadFromFile('class1.php'),
new IRI('coid://example.com/TestClass1')); new IRI('coid://example.com/TestClass1'));
} }