chore: code cleanup with rector and php-cs-fixer
This commit is contained in:
@@ -4,6 +4,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace App\Tests\Service;
|
||||
|
||||
use App\BusProNet\ApiClient;
|
||||
use App\BusProNet\Exception\ApiClientException;
|
||||
use App\BusProNet\Exception\TimeoutException;
|
||||
use App\BusProNet\Model\Booking;
|
||||
@@ -87,7 +88,7 @@ class BookingEditSubmitterTest extends TestCase
|
||||
->with($bookingDto, $freshBookingData)
|
||||
->willReturn(false);
|
||||
|
||||
$apiClient = $this->createMock(\App\BusProNet\ApiClient::class);
|
||||
$apiClient = $this->createMock(ApiClient::class);
|
||||
$apiClient->expects($this->once())
|
||||
->method('updateBooking')
|
||||
->with($bookingDto, true)
|
||||
@@ -137,7 +138,7 @@ class BookingEditSubmitterTest extends TestCase
|
||||
->with($bookingDto, $freshBookingData)
|
||||
->willReturn(false);
|
||||
|
||||
$apiClient = $this->createMock(\App\BusProNet\ApiClient::class);
|
||||
$apiClient = $this->createMock(ApiClient::class);
|
||||
$bookingUpdate = new BookingUpdate();
|
||||
$bookingUpdate->success = false;
|
||||
$bookingUpdate->status = 'BPN-FAIL';
|
||||
@@ -200,7 +201,7 @@ class BookingEditSubmitterTest extends TestCase
|
||||
->with($bookingDto, $freshBookingData)
|
||||
->willReturn(false);
|
||||
|
||||
$apiClient = $this->createMock(\App\BusProNet\ApiClient::class);
|
||||
$apiClient = $this->createMock(ApiClient::class);
|
||||
$bookingUpdate = new BookingUpdate();
|
||||
$bookingUpdate->success = true;
|
||||
$apiClient->expects($this->once())
|
||||
@@ -266,7 +267,7 @@ class BookingEditSubmitterTest extends TestCase
|
||||
->with($bookingDto, $freshBookingData)
|
||||
->willReturn(true);
|
||||
|
||||
$apiClient = $this->createMock(\App\BusProNet\ApiClient::class);
|
||||
$apiClient = $this->createMock(ApiClient::class);
|
||||
$bookingUpdate = new BookingUpdate();
|
||||
$bookingUpdate->success = true;
|
||||
$apiClient->expects($this->once())
|
||||
@@ -350,7 +351,7 @@ class BookingEditSubmitterTest extends TestCase
|
||||
->with($bookingDto, $freshBookingData)
|
||||
->willReturn(false);
|
||||
|
||||
$apiClient = $this->createMock(\App\BusProNet\ApiClient::class);
|
||||
$apiClient = $this->createMock(ApiClient::class);
|
||||
$apiClient->expects($this->once())
|
||||
->method('updateBooking')
|
||||
->with($bookingDto, true)
|
||||
@@ -400,7 +401,7 @@ class BookingEditSubmitterTest extends TestCase
|
||||
->with($bookingDto, $freshBookingData)
|
||||
->willReturn(false);
|
||||
|
||||
$apiClient = $this->createMock(\App\BusProNet\ApiClient::class);
|
||||
$apiClient = $this->createMock(ApiClient::class);
|
||||
$apiClient->expects($this->once())
|
||||
->method('updateBooking')
|
||||
->with($bookingDto, true)
|
||||
@@ -421,7 +422,7 @@ class BookingEditSubmitterTest extends TestCase
|
||||
}
|
||||
|
||||
private function createService(
|
||||
?\App\BusProNet\ApiClient $apiClient = null,
|
||||
?ApiClient $apiClient = null,
|
||||
?BookingEditDataLoader $dataLoader = null,
|
||||
?BookingEditDraftManager $draftService = null,
|
||||
?TravelDataProvider $travelDataService = null,
|
||||
@@ -429,7 +430,7 @@ class BookingEditSubmitterTest extends TestCase
|
||||
?BookingSessionManager $bookingSessionService = null,
|
||||
): BookingEditSubmitter {
|
||||
return new BookingEditSubmitter(
|
||||
$apiClient ?? $this->createMock(\App\BusProNet\ApiClient::class),
|
||||
$apiClient ?? $this->createMock(ApiClient::class),
|
||||
$dataLoader ?? $this->createMock(BookingEditDataLoader::class),
|
||||
$draftService ?? $this->createMock(BookingEditDraftManager::class),
|
||||
$travelDataService ?? $this->createMock(TravelDataProvider::class),
|
||||
|
||||
Reference in New Issue
Block a user