FIX: prueba Servicio Customer
This commit is contained in:
@ -44,15 +44,24 @@ class CustomerTest extends TestCase
|
||||
$persona->apellidoPaterno = $faker->lastName();
|
||||
$persona->apellidoMaterno = $faker->lastName();
|
||||
$persona->method('datos')->willReturn($datos);
|
||||
$persona->method('nombreCompleto')->willReturn(implode(' ', [
|
||||
$persona->nombres,
|
||||
$persona->apellidoPaterno,
|
||||
$persona->apellidoMaterno
|
||||
]));
|
||||
|
||||
$this->customer = $this->getMockBuilder(Model\MediosPago\Toku\Customer::class)
|
||||
->disableOriginalConstructor()->getMock();
|
||||
$this->customer->id = $faker->randomNumber();
|
||||
$this->customer->persona = $persona;
|
||||
$this->customer->toku_id = $faker->ean13();
|
||||
$this->customer->method('rut')->willReturn(implode('', [
|
||||
$persona->rut,
|
||||
strtoupper($persona->digito)
|
||||
]));
|
||||
$this->customer->method('jsonSerialize')->willReturn([
|
||||
'id' => $this->customer->id,
|
||||
'rut' => implode('', [$persona->rut, $persona->digito]),
|
||||
'rut' => $this->customer->rut(),
|
||||
'toku_id' => $this->customer->toku_id
|
||||
]);
|
||||
|
||||
@ -63,10 +72,10 @@ class CustomerTest extends TestCase
|
||||
|
||||
$this->getData = [
|
||||
'id' => $this->customer->id,
|
||||
'external_id' => implode('', [$persona->rut, $persona->digito]),
|
||||
'government_id' => implode('', [$persona->rut, $persona->digito]),
|
||||
'external_id' => $this->customer->rut(),
|
||||
'government_id' => $this->customer->rut(),
|
||||
'email' => $persona->datos()->email,
|
||||
'name' => implode(' ', [$persona->nombres, $persona->apellidoPaterno, $persona->apellidoMaterno]),
|
||||
'name' => $persona->nombreCompleto(),
|
||||
'phone_number' => $persona->datos()->telefono,
|
||||
'silenced_until' => null,
|
||||
'default_agent' => null,
|
||||
@ -92,10 +101,10 @@ class CustomerTest extends TestCase
|
||||
|
||||
$this->postData = [
|
||||
'id' => $this->customer->id,
|
||||
'external_id' => implode('', [$persona->rut, $persona->digito]),
|
||||
'government_id' => implode('', [$persona->rut, $persona->digito]),
|
||||
'external_id' => $this->customer->rut(),
|
||||
'government_id' => $this->customer->rut(),
|
||||
'email' => $persona->datos()->email,
|
||||
'name' => implode(' ', [$persona->nombres, $persona->apellidoPaterno, $persona->apellidoMaterno]),
|
||||
'name' => $persona->nombreCompleto(),
|
||||
'phone_number' => $persona->datos()->telefono,
|
||||
'silenced_until' => null,
|
||||
'default_agent' => null,
|
||||
|
Reference in New Issue
Block a user