Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
GLPI
glpi
Commits
35889fa3
Commit
35889fa3
authored
Jun 09, 2021
by
Stanislas KITA
Committed by
Cédric Anne
Jun 09, 2021
Browse files
refactor(code): refactor TU
parent
a259624d
Changes
1
Hide whitespace changes
Inline
Side-by-side
tests/functionnal/RuleTicket.php
View file @
35889fa3
...
...
@@ -858,10 +858,9 @@ class RuleTicket extends DbTestCase {
'_users_id_requester'
=>
$user
->
fields
[
'id'
]
]);
unset
(
$ticket_input
[
'_users_id_requester'
]);
unset
(
$ticket_input
[
'id'
]);
$this
->
checkInput
(
$ticket
,
$tickets_id
,
$ticket_input
);
//link between group
e
1 and ticket will not exist
//link between group1 and ticket will not exist
$ticketGroup
=
new
\
Group_Ticket
();
$this
->
boolean
(
$ticketGroup
->
getFromDBByCrit
([
...
...
@@ -871,7 +870,7 @@ class RuleTicket extends DbTestCase {
])
)
->
isFalse
();
//link between group
e
2 and ticket will not exist
//link between group2 and ticket will not exist
$this
->
boolean
(
$ticketGroup
->
getFromDBByCrit
([
'tickets_id'
=>
$tickets_id
,
...
...
@@ -880,7 +879,7 @@ class RuleTicket extends DbTestCase {
])
)
->
isFalse
();
//link between group
e
3 and ticket will not exist
//link between group3 and ticket will not exist
$this
->
boolean
(
$ticketGroup
->
getFromDBByCrit
([
'tickets_id'
=>
$tickets_id
,
...
...
@@ -1042,7 +1041,6 @@ class RuleTicket extends DbTestCase {
'_users_id_requester'
=>
$user
->
fields
[
'id'
]
]);
unset
(
$ticket_input
[
'_users_id_requester'
]);
unset
(
$ticket_input
[
'id'
]);
$this
->
checkInput
(
$ticket
,
$tickets_id
,
$ticket_input
);
//link between group1 and ticket will exist
...
...
@@ -1171,10 +1169,9 @@ class RuleTicket extends DbTestCase {
'_users_id_requester'
=>
$userPostOnly
->
fields
[
'id'
]
]);
unset
(
$ticket_input
[
'_users_id_requester'
]);
unset
(
$ticket_input
[
'id'
]);
$this
->
checkInput
(
$ticket
,
$tickets_id
,
$ticket_input
);
//link between group
e
1 and ticket will not exist
//link between group1 and ticket will not exist
$ticketGroup
=
new
\
Group_Ticket
();
$this
->
boolean
(
$ticketGroup
->
getFromDBByCrit
([
...
...
@@ -1184,7 +1181,7 @@ class RuleTicket extends DbTestCase {
])
)
->
isFalse
();
//link between group
e
2 and ticket will not exist
//link between group2 and ticket will not exist
$this
->
boolean
(
$ticketGroup
->
getFromDBByCrit
([
'tickets_id'
=>
$tickets_id
,
...
...
@@ -1193,7 +1190,7 @@ class RuleTicket extends DbTestCase {
])
)
->
isFalse
();
//link between group
e
2 and ticket will not exist
//link between group2 and ticket will not exist
$this
->
boolean
(
$ticketGroup
->
getFromDBByCrit
([
'tickets_id'
=>
$tickets_id
,
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment