ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
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 29 of file ilSearchLuceneQueryParserTest.php.

Member Function Documentation

◆ initDependencies()

ilSearchLuceneQueryParserTest::initDependencies ( )
protected

Definition at line 74 of file ilSearchLuceneQueryParserTest.php.

74 : void
75 {
76 }

Referenced by setUp().

+ Here is the caller graph for this function:

◆ setGlobalVariable()

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

Definition at line 63 of file ilSearchLuceneQueryParserTest.php.

63 : void
64 {
65 global $DIC;
66
67 $GLOBALS[$name] = $value;
68 unset($DIC[$name]);
69 $DIC[$name] = static function (\ILIAS\DI\Container $c) use ($value) {
70 return $value;
71 };
72 }
Customizing of pimple-DIC for ILIAS.
Definition: Container.php:36
$c
Definition: deliver.php:25
global $DIC
Definition: shib_login.php:26
$GLOBALS["DIC"]
Definition: wac.php:54

References $c, $DIC, and $GLOBALS.

◆ setUp()

ilSearchLuceneQueryParserTest::setUp ( )
protected

Definition at line 39 of file ilSearchLuceneQueryParserTest.php.

39 : void
40 {
41 $this->initDependencies();
42 parent::setUp();
43 }

References initDependencies().

+ Here is the call graph for this function:

◆ testConstruct()

ilSearchLuceneQueryParserTest::testConstruct ( )

Definition at line 45 of file ilSearchLuceneQueryParserTest.php.

45 : void
46 {
47 $qp = new ilLuceneQueryParser('query');
48 $this->assertTrue($qp instanceof ilLuceneQueryParser);
49 }

◆ testFailedParenthesis()

ilSearchLuceneQueryParserTest::testFailedParenthesis ( )

Definition at line 57 of file ilSearchLuceneQueryParserTest.php.

57 : void
58 {
59 $this->expectException(ilLuceneQueryParserException::class);
61 }

References ilLuceneQueryParser\validateQuery().

+ Here is the call graph for this function:

◆ testValidation()

ilSearchLuceneQueryParserTest::testValidation ( )

Definition at line 51 of file ilSearchLuceneQueryParserTest.php.

51 : void
52 {
53 $qp = new ilLuceneQueryParser('');
54 $this->assertTrue(ilLuceneQueryParser::validateQuery('type:crs'));
55 }

References ilLuceneQueryParser\validateQuery().

+ Here is the call graph for this function:

Field Documentation

◆ $backupGlobals

ilSearchLuceneQueryParserTest::$backupGlobals = false
protected

Definition at line 35 of file ilSearchLuceneQueryParserTest.php.

◆ $dic

Container ilSearchLuceneQueryParserTest::$dic
protected

Definition at line 37 of file ilSearchLuceneQueryParserTest.php.


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