ILIAS
release_8 Revision v8.19
◀ ilDoc Overview
Main Page
Related Pages
Modules
+
Namespaces
Namespace List
+
Namespace Members
+
All
$
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
u
v
w
x
+
Functions
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
+
Variables
$
a
b
c
d
e
f
g
h
j
l
m
p
s
t
u
+
Data Structures
Data Structures
Data Structure Index
Class Hierarchy
+
Data Fields
+
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Ö
+
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Variables
$
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Ö
+
Files
File List
+
Globals
+
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
z
+
Functions
_
a
b
c
d
e
g
h
i
m
n
p
r
s
t
u
v
x
+
Variables
$
a
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
z
Examples
•
All
Data Structures
Namespaces
Files
Functions
Variables
Modules
Pages
ilSearchLuceneQueryParserTest.php
Go to the documentation of this file.
1
<?php
2
3
declare(strict_types=1);
4
5
use
PHPUnit\Framework\TestCase
;
6
use
ILIAS\DI\Container
;
7
13
class
ilSearchLuceneQueryParserTest
extends
TestCase
14
{
19
protected
$backupGlobals
=
false
;
20
21
protected
Container
$dic
;
22
23
protected
function
setUp
(): void
24
{
25
$this->
initDependencies
();
26
parent::setUp();
27
}
28
29
public
function
testConstruct
(): void
30
{
31
$qp =
new
ilLuceneQueryParser
(
'query'
);
32
$this->assertTrue($qp instanceof
ilLuceneQueryParser
);
33
}
34
35
public
function
testValidation
(): void
36
{
37
$qp =
new
ilLuceneQueryParser
(
''
);
38
$this->assertTrue(
ilLuceneQueryParser::validateQuery
(
'type:crs'
));
39
}
40
41
public
function
testFailedParenthesis
(): void
42
{
43
$this->expectException(ilLuceneQueryParserException::class);
44
ilLuceneQueryParser::validateQuery
(
'(()'
);
45
}
46
47
protected
function
setGlobalVariable
(
string
$name
, $value): void
48
{
49
global
$DIC
;
50
51
$GLOBALS
[
$name
] = $value;
52
unset($DIC[$name]);
53
$DIC[
$name
] =
static
function
(
\ILIAS\DI\Container
$c
) use ($value) {
54
return
$value;
55
};
56
}
57
58
protected
function
initDependencies
(): void
59
{
60
}
61
}
$c
$c
Definition:
cli.php:38
ilSearchLuceneQueryParserTest\$backupGlobals
$backupGlobals
Definition:
ilSearchLuceneQueryParserTest.php:19
ilSearchLuceneQueryParserTest\testFailedParenthesis
testFailedParenthesis()
Definition:
ilSearchLuceneQueryParserTest.php:41
ILIAS\DI\Container
Customizing of pimple-DIC for ILIAS.
Definition:
Container.php:31
$DIC
global $DIC
Definition:
feed.php:28
Container
$name
if($format !==null) $name
Definition:
metadata.php:247
ilLuceneQueryParser\validateQuery
static validateQuery($a_query)
Definition:
class.ilLuceneQueryParser.php:100
$GLOBALS
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
Definition:
PEAR.php:64
ilSearchLuceneQueryParserTest\testConstruct
testConstruct()
Definition:
ilSearchLuceneQueryParserTest.php:29
ilSearchLuceneQueryParserTest\testValidation
testValidation()
Definition:
ilSearchLuceneQueryParserTest.php:35
ilLuceneQueryParser
Lucene query parser.
Definition:
class.ilLuceneQueryParser.php:35
ilSearchLuceneQueryParserTest\initDependencies
initDependencies()
Definition:
ilSearchLuceneQueryParserTest.php:58
ilSearchLuceneQueryParserTest\$dic
Container $dic
Definition:
ilSearchLuceneQueryParserTest.php:21
ilSearchLuceneQueryParserTest\setGlobalVariable
setGlobalVariable(string $name, $value)
Definition:
ilSearchLuceneQueryParserTest.php:47
ilSearchLuceneQueryParserTest
Unit tests for class ilDidacticTemplate.
Definition:
ilSearchLuceneQueryParserTest.php:13
ilSearchLuceneQueryParserTest\setUp
setUp()
Definition:
ilSearchLuceneQueryParserTest.php:23
TestCase
Services
Search
test
ilSearchLuceneQueryParserTest.php
Generated on Sun Apr 6 2025 22:02:46 for ILIAS by
1.8.13 (using
Doxyfile
)