Pruebas de Toku

This commit is contained in:
Juan Pablo Vial
2025-05-09 18:04:57 -04:00
parent c2f98c8b0d
commit db84187461
8 changed files with 274 additions and 24 deletions

View File

@ -6,9 +6,12 @@ use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\TestCase;
use Incoviba\Model\MediosPago\Toku\Customer;
use Incoviba\Model\Persona;
use Tests\Extension\ObjectHasMethodTrait;
class CustomerTest extends TestCase
{
use ObjectHasMethodTrait;
public static function dataProperties(): array
{
return [
@ -17,7 +20,6 @@ class CustomerTest extends TestCase
['toku_id']
];
}
#[DataProvider('dataProperties')]
public function testProperties(string $propertyName): void
{
@ -26,6 +28,20 @@ class CustomerTest extends TestCase
$this->assertObjectHasProperty($propertyName, $customer);
}
public static function dataMethods(): array
{
return [
['rut']
];
}
#[DataProvider('dataMethods')]
public function testMethods(string $methodName): void
{
$customer = new Customer();
$this->assertObjectHasMethod($methodName, $customer);
}
public function testJson(): void
{
$faker = Faker\Factory::create();