This commit is contained in:
2025-02-03 18:49:47 +03:00
parent f1a79d66ec
commit dd62ad0ca4
1739 changed files with 154102 additions and 0 deletions

View File

@@ -0,0 +1,30 @@
<?php
namespace goodboyalex\php_components_pack\tests\classes;
use goodboyalex\php_components_pack\classes\ClassMapper;
use PHPUnit\Framework\TestCase;
class ClassMapperTest extends TestCase
{
public function testMapClass ()
{
$this->PrepareForTest();
$a = new \goodboyalex\php_components_pack\tests\data\A();
$a->a = 'a';
$a->b = 2;
$a->c = true;
$b = new B();
ClassMapper::MapClass($a, $b);
$this->assertEquals('a', $b->a);
$this->assertEquals(2, $b->b);
}
private function PrepareForTest (): void
{
require_once __DIR__ . '/../../sources/classes/classMapper.php';
}
}