Commit 35889fa3 authored by Stanislas KITA's avatar Stanislas KITA Committed by Cédric Anne
Browse files

refactor(code): refactor TU

parent a259624d
...@@ -858,10 +858,9 @@ class RuleTicket extends DbTestCase { ...@@ -858,10 +858,9 @@ class RuleTicket extends DbTestCase {
'_users_id_requester' => $user->fields['id'] '_users_id_requester' => $user->fields['id']
]); ]);
unset($ticket_input['_users_id_requester']); unset($ticket_input['_users_id_requester']);
unset($ticket_input['id']);
$this->checkInput($ticket, $tickets_id, $ticket_input); $this->checkInput($ticket, $tickets_id, $ticket_input);
//link between groupe1 and ticket will not exist //link between group1 and ticket will not exist
$ticketGroup = new \Group_Ticket(); $ticketGroup = new \Group_Ticket();
$this->boolean( $this->boolean(
$ticketGroup->getFromDBByCrit([ $ticketGroup->getFromDBByCrit([
...@@ -871,7 +870,7 @@ class RuleTicket extends DbTestCase { ...@@ -871,7 +870,7 @@ class RuleTicket extends DbTestCase {
]) ])
)->isFalse(); )->isFalse();
//link between groupe2 and ticket will not exist //link between group2 and ticket will not exist
$this->boolean( $this->boolean(
$ticketGroup->getFromDBByCrit([ $ticketGroup->getFromDBByCrit([
'tickets_id' => $tickets_id, 'tickets_id' => $tickets_id,
...@@ -880,7 +879,7 @@ class RuleTicket extends DbTestCase { ...@@ -880,7 +879,7 @@ class RuleTicket extends DbTestCase {
]) ])
)->isFalse(); )->isFalse();
//link between groupe3 and ticket will not exist //link between group3 and ticket will not exist
$this->boolean( $this->boolean(
$ticketGroup->getFromDBByCrit([ $ticketGroup->getFromDBByCrit([
'tickets_id' => $tickets_id, 'tickets_id' => $tickets_id,
...@@ -1042,7 +1041,6 @@ class RuleTicket extends DbTestCase { ...@@ -1042,7 +1041,6 @@ class RuleTicket extends DbTestCase {
'_users_id_requester' => $user->fields['id'] '_users_id_requester' => $user->fields['id']
]); ]);
unset($ticket_input['_users_id_requester']); unset($ticket_input['_users_id_requester']);
unset($ticket_input['id']);
$this->checkInput($ticket, $tickets_id, $ticket_input); $this->checkInput($ticket, $tickets_id, $ticket_input);
//link between group1 and ticket will exist //link between group1 and ticket will exist
...@@ -1171,10 +1169,9 @@ class RuleTicket extends DbTestCase { ...@@ -1171,10 +1169,9 @@ class RuleTicket extends DbTestCase {
'_users_id_requester' => $userPostOnly->fields['id'] '_users_id_requester' => $userPostOnly->fields['id']
]); ]);
unset($ticket_input['_users_id_requester']); unset($ticket_input['_users_id_requester']);
unset($ticket_input['id']);
$this->checkInput($ticket, $tickets_id, $ticket_input); $this->checkInput($ticket, $tickets_id, $ticket_input);
//link between groupe1 and ticket will not exist //link between group1 and ticket will not exist
$ticketGroup = new \Group_Ticket(); $ticketGroup = new \Group_Ticket();
$this->boolean( $this->boolean(
$ticketGroup->getFromDBByCrit([ $ticketGroup->getFromDBByCrit([
...@@ -1184,7 +1181,7 @@ class RuleTicket extends DbTestCase { ...@@ -1184,7 +1181,7 @@ class RuleTicket extends DbTestCase {
]) ])
)->isFalse(); )->isFalse();
//link between groupe2 and ticket will not exist //link between group2 and ticket will not exist
$this->boolean( $this->boolean(
$ticketGroup->getFromDBByCrit([ $ticketGroup->getFromDBByCrit([
'tickets_id' => $tickets_id, 'tickets_id' => $tickets_id,
...@@ -1193,7 +1190,7 @@ class RuleTicket extends DbTestCase { ...@@ -1193,7 +1190,7 @@ class RuleTicket extends DbTestCase {
]) ])
)->isFalse(); )->isFalse();
//link between groupe2 and ticket will not exist //link between group2 and ticket will not exist
$this->boolean( $this->boolean(
$ticketGroup->getFromDBByCrit([ $ticketGroup->getFromDBByCrit([
'tickets_id' => $tickets_id, 'tickets_id' => $tickets_id,
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment