Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
glpi
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Packages & Registries
Packages & Registries
Package Registry
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
GLPI
glpi
Commits
1086d077
Commit
1086d077
authored
Apr 11, 2019
by
Johan Cwiklinski
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '9.4/bugfixes' into 9.5/bugfixes
parents
d629ab52
97b0dbe5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
1 deletion
+21
-1
tests/functionnal/Search.php
tests/functionnal/Search.php
+21
-1
No files found.
tests/functionnal/Search.php
View file @
1086d077
...
...
@@ -363,6 +363,20 @@ class Search extends DbTestCase {
]
]
]
],
[
'link'
=>
'AND NOT'
,
'itemtype'
=>
'Budget'
,
'meta'
=>
1
,
'field'
=>
2
,
'searchtype'
=>
'contains'
,
'value'
=>
5
,
],
[
'link'
=>
'AND NOT'
,
'itemtype'
=>
'Printer'
,
'meta'
=>
1
,
'field'
=>
1
,
'searchtype'
=>
'contains'
,
'value'
=>
'HP'
,
]
]
];
...
...
@@ -385,6 +399,10 @@ class Search extends DbTestCase {
->
matches
(
'/INNER JOIN\s*`glpi_computers_softwareversions`\s*AS `glpi_computers_softwareversions_Software`/im'
)
->
matches
(
'/INNER JOIN\s*`glpi_softwareversions`\s*AS `glpi_softwareversions_Software`/im'
)
->
matches
(
'/INNER JOIN\s*`glpi_softwares`\s*ON\s*\(`glpi_softwareversions_Software`\.`softwares_id`\s*=\s*`glpi_softwares`\.`id`\)/im'
)
->
matches
(
'/LEFT JOIN\s*`glpi_infocoms`\s*ON\s*\(`glpi_computers`\.`id`\s*=\s*`glpi_infocoms`\.`items_id`\s*AND\s*`glpi_infocoms`.`itemtype`\s*=\s*\'Computer\'\)/im'
)
->
matches
(
'/LEFT JOIN\s*`glpi_budgets`\s*ON\s*\(`glpi_infocoms`\.`budgets_id`\s*=\s*`glpi_budgets`\.`id`\)/im'
)
->
matches
(
'/LEFT JOIN\s*`glpi_computers_items`\s*AS `glpi_computers_items_Printer`\s*ON\s*\(`glpi_computers_items_Printer`\.`computers_id`\s*=\s*`glpi_computers`\.`id`\s*AND\s*`glpi_computers_items_Printer`.`itemtype`\s*=\s*\'Printer\'\s*AND\s*`glpi_computers_items_Printer`.`is_deleted`\s*=\s*0\)/im'
)
->
matches
(
'/LEFT JOIN\s*`glpi_printers`\s*ON\s*\(`glpi_computers_items_Printer`\.`items_id`\s*=\s*`glpi_printers`\.`id`\)/im'
)
// match where parts
->
contains
(
"`glpi_computers`.`is_deleted` = 0"
)
->
contains
(
"AND `glpi_computers`.`is_template` = 0"
)
...
...
@@ -396,7 +414,9 @@ class Search extends DbTestCase {
->
contains
(
"OR (`glpi_computers`.`id` LIKE '%test2%'"
)
->
contains
(
"AND (`glpi_locations`.`id` = '11')"
)
->
contains
(
"(`glpi_users`.`id` = '2')"
)
->
contains
(
"OR (`glpi_users`.`id` = '3')"
);
->
contains
(
"OR (`glpi_users`.`id` = '3')"
)
// match having
->
matches
(
"/HAVING\s*\(`ITEM_Budget_2`\s+<>\s+5\)\s+AND\s+\(\(`ITEM_Printer_1`\s+NOT LIKE\s+'%HP%'\s+OR\s+`ITEM_Printer_1`\s+IS NULL\)\s*\)/"
);
}
function
testViewCriterion
()
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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