Fix tests
This commit is contained in:
parent
cc880a15fc
commit
f40eaf1a23
@ -66,7 +66,7 @@ class AutoassignerTest extends TestCase {
|
||||
$userWithOneOpenTicket
|
||||
);
|
||||
|
||||
$this->userGateway->method('getUsersByNumberOfOpenTickets')
|
||||
$this->userGateway->method('getUsersByNumberOfOpenTicketsForAutoassign')
|
||||
->with($this->heskSettings)
|
||||
->willReturn($usersToReturn);
|
||||
|
||||
@ -92,7 +92,7 @@ class AutoassignerTest extends TestCase {
|
||||
$userWithOneOpenTicket
|
||||
);
|
||||
|
||||
$this->userGateway->method('getUsersByNumberOfOpenTickets')
|
||||
$this->userGateway->method('getUsersByNumberOfOpenTicketsForAutoassign')
|
||||
->with($this->heskSettings)
|
||||
->willReturn($usersToReturn);
|
||||
|
||||
@ -119,7 +119,7 @@ class AutoassignerTest extends TestCase {
|
||||
$userWithOneOpenTicket
|
||||
);
|
||||
|
||||
$this->userGateway->method('getUsersByNumberOfOpenTickets')
|
||||
$this->userGateway->method('getUsersByNumberOfOpenTicketsForAutoassign')
|
||||
->with($this->heskSettings)
|
||||
->willReturn($usersToReturn);
|
||||
|
||||
@ -145,7 +145,7 @@ class AutoassignerTest extends TestCase {
|
||||
$userWithOneOpenTicket
|
||||
);
|
||||
|
||||
$this->userGateway->method('getUsersByNumberOfOpenTickets')
|
||||
$this->userGateway->method('getUsersByNumberOfOpenTicketsForAutoassign')
|
||||
->with($this->heskSettings)
|
||||
->willReturn($usersToReturn);
|
||||
|
||||
@ -171,7 +171,7 @@ class AutoassignerTest extends TestCase {
|
||||
$userWithOneOpenTicket
|
||||
);
|
||||
|
||||
$this->userGateway->method('getUsersByNumberOfOpenTickets')
|
||||
$this->userGateway->method('getUsersByNumberOfOpenTicketsForAutoassign')
|
||||
->with($this->heskSettings)
|
||||
->willReturn($usersToReturn);
|
||||
|
||||
|
@ -7,6 +7,7 @@ use BusinessLogic\Emails\Addressees;
|
||||
use BusinessLogic\Emails\EmailSenderHelper;
|
||||
use BusinessLogic\Emails\EmailTemplateRetriever;
|
||||
use BusinessLogic\Security\UserContext;
|
||||
use BusinessLogic\Security\UserContextNotifications;
|
||||
use BusinessLogic\Statuses\Status;
|
||||
use BusinessLogic\Tickets\Autoassigner;
|
||||
use BusinessLogic\Tickets\CreateTicketByCustomerModel;
|
||||
@ -136,6 +137,7 @@ class CreateTicketTest extends TestCase {
|
||||
$this->trackingIdGenerator->method('generateTrackingId')->willReturn('123-456-7890');
|
||||
$this->ticketGatewayGeneratedFields = new TicketGatewayGeneratedFields();
|
||||
$this->ticketGateway->method('createTicket')->willReturn($this->ticketGatewayGeneratedFields);
|
||||
$this->userGateway->method('getUsersForNewTicketNotification')->willReturn(array());
|
||||
|
||||
$status = new Status();
|
||||
$status->id = 1;
|
||||
@ -169,8 +171,12 @@ class CreateTicketTest extends TestCase {
|
||||
//-- Arrange
|
||||
$this->heskSettings['autoassign'] = 1;
|
||||
$autoassignUser = new UserContext();
|
||||
$notificationSettings = new UserContextNotifications();
|
||||
$notificationSettings->newAssignedToMe = true;
|
||||
$autoassignUser->notificationSettings = $notificationSettings;
|
||||
$autoassignUser->id = 1;
|
||||
$this->autoassigner->method('getNextUserForTicket')->willReturn($autoassignUser);
|
||||
$this->userGateway->method('getUserById')->willReturn($autoassignUser);
|
||||
$this->modsForHeskSettingsGateway->method('getAllSettings')->willReturn($this->modsForHeskSettings);
|
||||
|
||||
//-- Act
|
||||
|
Loading…
x
Reference in New Issue
Block a user