feat(test): add multi-engine integration matrix
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace Tests\Unit;
|
||||
|
||||
use PHPUnit\Framework\Attributes\Test;
|
||||
use Libs\Neuron;
|
||||
use Tests\TestCase;
|
||||
|
||||
@@ -13,7 +14,8 @@ use Tests\TestCase;
|
||||
*/
|
||||
final class NeuronTest extends TestCase
|
||||
{
|
||||
public function testConstructFromAssociativeArray(): void
|
||||
#[Test]
|
||||
public function constructFromAssociativeArray(): void
|
||||
{
|
||||
$n = new Neuron(['username' => 'kj', 'level' => 3]);
|
||||
|
||||
@@ -21,7 +23,9 @@ final class NeuronTest extends TestCase
|
||||
$this->assertSame(3, $n->level);
|
||||
}
|
||||
|
||||
public function testConstructFromObjectCopiesPublicProperties(): void
|
||||
#[Test]
|
||||
|
||||
public function constructFromObjectCopiesPublicProperties(): void
|
||||
{
|
||||
$source = new \stdClass();
|
||||
$source->id = 7;
|
||||
@@ -33,14 +37,18 @@ final class NeuronTest extends TestCase
|
||||
$this->assertSame('kj@example.com', $n->email);
|
||||
}
|
||||
|
||||
public function testUndefinedPropertyIsNullWithoutNotice(): void
|
||||
#[Test]
|
||||
|
||||
public function undefinedPropertyIsNullWithoutNotice(): void
|
||||
{
|
||||
$n = new Neuron();
|
||||
|
||||
$this->assertNull($n->thisDoesNotExist);
|
||||
}
|
||||
|
||||
public function testDynamicPropertiesCanBeAssignedAndRead(): void
|
||||
#[Test]
|
||||
|
||||
public function dynamicPropertiesCanBeAssignedAndRead(): void
|
||||
{
|
||||
$n = new Neuron();
|
||||
$n->fresh = ['a', 'b'];
|
||||
@@ -48,7 +56,9 @@ final class NeuronTest extends TestCase
|
||||
$this->assertSame(['a', 'b'], $n->fresh);
|
||||
}
|
||||
|
||||
public function testNestedValuesArePreservedVerbatim(): void
|
||||
#[Test]
|
||||
|
||||
public function nestedValuesArePreservedVerbatim(): void
|
||||
{
|
||||
$payload = ['meta' => ['tags' => ['x', 'y'], 'n' => null]];
|
||||
$n = new Neuron($payload);
|
||||
|
||||
Reference in New Issue
Block a user