ILIAS  release_8 Revision v8.24
ilSearchLuceneQueryParserTest Class Reference

Unit tests for class ilDidacticTemplate. More...

+ Inheritance diagram for ilSearchLuceneQueryParserTest:
+ Collaboration diagram for ilSearchLuceneQueryParserTest:

Public Member Functions

 testConstruct ()
 
 testValidation ()
 
 testFailedParenthesis ()
 

Protected Member Functions

 setUp ()
 
 setGlobalVariable (string $name, $value)
 
 initDependencies ()
 

Protected Attributes

 $backupGlobals = false
 
Container $dic
 

Detailed Description

Unit tests for class ilDidacticTemplate.

Author
Stefan Meyer meyer.nosp@m.@lei.nosp@m.fos.c.nosp@m.om

Definition at line 13 of file ilSearchLuceneQueryParserTest.php.

Member Function Documentation

◆ initDependencies()

ilSearchLuceneQueryParserTest::initDependencies ( )
protected

Definition at line 58 of file ilSearchLuceneQueryParserTest.php.

58 : void
59 {
60 }

Referenced by setUp().

+ Here is the caller graph for this function:

◆ setGlobalVariable()

ilSearchLuceneQueryParserTest::setGlobalVariable ( string  $name,
  $value 
)
protected

Definition at line 47 of file ilSearchLuceneQueryParserTest.php.

47 : 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 }
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
Definition: PEAR.php:64
Customizing of pimple-DIC for ILIAS.
Definition: Container.php:32
$c
Definition: cli.php:38
global $DIC
Definition: feed.php:28
if($format !==null) $name
Definition: metadata.php:247

References $c, $DIC, $GLOBALS, and $name.

◆ setUp()

ilSearchLuceneQueryParserTest::setUp ( )
protected

Definition at line 23 of file ilSearchLuceneQueryParserTest.php.

23 : void
24 {
25 $this->initDependencies();
26 parent::setUp();
27 }

References initDependencies().

+ Here is the call graph for this function:

◆ testConstruct()

ilSearchLuceneQueryParserTest::testConstruct ( )

Definition at line 29 of file ilSearchLuceneQueryParserTest.php.

29 : void
30 {
31 $qp = new ilLuceneQueryParser('query');
32 $this->assertTrue($qp instanceof ilLuceneQueryParser);
33 }

◆ testFailedParenthesis()

ilSearchLuceneQueryParserTest::testFailedParenthesis ( )

Definition at line 41 of file ilSearchLuceneQueryParserTest.php.

41 : void
42 {
43 $this->expectException(ilLuceneQueryParserException::class);
45 }

References ilLuceneQueryParser\validateQuery().

+ Here is the call graph for this function:

◆ testValidation()

ilSearchLuceneQueryParserTest::testValidation ( )

Definition at line 35 of file ilSearchLuceneQueryParserTest.php.

35 : void
36 {
37 $qp = new ilLuceneQueryParser('');
38 $this->assertTrue(ilLuceneQueryParser::validateQuery('type:crs'));
39 }

References ilLuceneQueryParser\validateQuery().

+ Here is the call graph for this function:

Field Documentation

◆ $backupGlobals

ilSearchLuceneQueryParserTest::$backupGlobals = false
protected

Definition at line 19 of file ilSearchLuceneQueryParserTest.php.

◆ $dic

Container ilSearchLuceneQueryParserTest::$dic
protected

Definition at line 21 of file ilSearchLuceneQueryParserTest.php.


The documentation for this class was generated from the following file: