ILIAS  trunk Revision v11.0_alpha-1715-g7fc467680fb
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
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.

Referenced by setUp().

74  : void
75  {
76  }
+ Here is the caller graph for this function:

◆ setGlobalVariable()

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

Definition at line 63 of file ilSearchLuceneQueryParserTest.php.

References $c, $DIC, and $GLOBALS.

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  }
$c
Definition: deliver.php:25
Customizing of pimple-DIC for ILIAS.
Definition: Container.php:35
$GLOBALS["DIC"]
Definition: wac.php:53
global $DIC
Definition: shib_login.php:22

◆ setUp()

ilSearchLuceneQueryParserTest::setUp ( )
protected

Definition at line 39 of file ilSearchLuceneQueryParserTest.php.

References initDependencies().

39  : void
40  {
41  $this->initDependencies();
42  parent::setUp();
43  }
+ 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.

References ilLuceneQueryParser\validateQuery().

57  : void
58  {
59  $this->expectException(ilLuceneQueryParserException::class);
61  }
+ Here is the call graph for this function:

◆ testValidation()

ilSearchLuceneQueryParserTest::testValidation ( )

Definition at line 51 of file ilSearchLuceneQueryParserTest.php.

References ilLuceneQueryParser\validateQuery().

51  : void
52  {
53  $qp = new ilLuceneQueryParser('');
54  $this->assertTrue(ilLuceneQueryParser::validateQuery('type:crs'));
55  }
+ 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: