Pruebas y chequeos
This commit is contained in:
@ -58,6 +58,11 @@ class ReservationTest extends TestCase
|
||||
->disableOriginalConstructor()->getMock();
|
||||
$this->promotionService = $this->getMockBuilder(Service\Venta\Promotion::class)
|
||||
->disableOriginalConstructor()->getMock();
|
||||
$this->promotionService->method('getById')->willReturnCallback(function($id) {
|
||||
$promotion = new Model\Venta\Promotion();
|
||||
$promotion->id = $id;
|
||||
return $promotion;
|
||||
});
|
||||
$this->unitService = $this->getMockBuilder(Service\Venta\Unidad::class)
|
||||
->disableOriginalConstructor()->getMock();
|
||||
$this->unitService->method('getById')->willReturnCallback(function($id) {
|
||||
@ -84,7 +89,7 @@ class ReservationTest extends TestCase
|
||||
$digit = $faker->boolean(100-round(1/11*100)) ? $faker->randomNumber(1) : 'K';
|
||||
$broker = $faker->boolean(10) ? $faker->randomNumber(8, true) : '';
|
||||
$promotions = [];
|
||||
$promotionsCount = $faker->numberBetween(0, 10);
|
||||
$promotionsCount = $faker->numberBetween(0, 3);
|
||||
for ($i = 0; $i < $promotionsCount; $i++) {
|
||||
$promotions[] = $faker->numberBetween(1, 100);
|
||||
}
|
||||
|
Reference in New Issue
Block a user