ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
ilDatabaseReservedWordsTest Class Reference

Class ilDatabaseReservedWordsTest. More...

+ Inheritance diagram for ilDatabaseReservedWordsTest:
+ Collaboration diagram for ilDatabaseReservedWordsTest:

Public Member Functions

 testReservedMDB2 ($word, $is_reserved)
 reservedData More...
 
 testReservedPDO ($word, $is_reserved)
 reservedData More...
 
 reservedData ()
 

Protected Member Functions

 setUp ()
 

Detailed Description

Member Function Documentation

◆ reservedData()

ilDatabaseReservedWordsTest::reservedData ( )
Returns
array

Definition at line 47 of file ilDatabaseReservedWordsTest.php.

47  {
48  return [
49  [ 'order', true ],
50  [ 'myfield', false ],
51  [ 'number', true ],
52  [ 'null', true ],
53  [ 'sensitive', true ],
54  [ 'usage', true ],
55  [ 'analyze', true ],
56  ];
57  }

◆ setUp()

ilDatabaseReservedWordsTest::setUp ( )
protected

Definition at line 10 of file ilDatabaseReservedWordsTest.php.

References $DIC, and $ilDB.

10  {
11  PHPUnit_Framework_Error_Notice::$enabled = false;
12  PHPUnit_Framework_Error_Deprecated::$enabled = false;
13  parent::setUp();
14  require_once('./Services/Database/classes/class.ilDBConstants.php');
15  global $ilDB, $DIC;
16  require_once('./Services/Database/classes/PDO/class.ilDBPdoMySQLInnoDB.php');
17  $ilDB = new ilDBPdoMySQLInnoDB();
18  $DIC['ilDB'] = $ilDB;
19  }
global $ilDB
Class ilDBPdoMySQLInnoDB.
global $DIC

◆ testReservedMDB2()

ilDatabaseReservedWordsTest::testReservedMDB2 (   $word,
  $is_reserved 
)

reservedData

Parameters
$word
$is_reserved

Definition at line 27 of file ilDatabaseReservedWordsTest.php.

References ilDB\isReservedWord().

27  {
28  require_once('./Services/Database/classes/MDB2/class.ilDBMySQL.php');
29  $this->assertEquals($is_reserved, ilDBMySQL::isReservedWord($word));
30  }
static isReservedWord($a_word)
Checks whether a word is a reserved word in one of the supported databases.
+ Here is the call graph for this function:

◆ testReservedPDO()

ilDatabaseReservedWordsTest::testReservedPDO (   $word,
  $is_reserved 
)

reservedData

Parameters
$word
$is_reserved

Definition at line 38 of file ilDatabaseReservedWordsTest.php.

References ilDBInterface\isReservedWord().

38  {
39  require_once('./Services/Database/classes/PDO/class.ilDBPdoMySQLInnoDB.php');
40  $this->assertEquals($is_reserved, ilDBPdoMySQLInnoDB::isReservedWord($word));
41  }
static isReservedWord($a_word)
+ Here is the call graph for this function:

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