Pruebas de Toku
This commit is contained in:
@ -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();
|
||||
|
Reference in New Issue
Block a user