ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
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 50 of file ilDatabaseReservedWordsTest.php.

51  {
52  return [
53  [ 'order', true ],
54  [ 'myfield', false ],
55  [ 'number', true ],
56  [ 'null', true ],
57  [ 'sensitive', true ],
58  [ 'usage', true ],
59  [ 'analyze', true ],
60  ];
61  }

◆ setUp()

ilDatabaseReservedWordsTest::setUp ( )
protected

Definition at line 10 of file ilDatabaseReservedWordsTest.php.

References $DIC, and $ilDB.

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

◆ testReservedMDB2()

ilDatabaseReservedWordsTest::testReservedMDB2 (   $word,
  $is_reserved 
)

reservedData

Parameters
$word
$is_reserved

Definition at line 28 of file ilDatabaseReservedWordsTest.php.

References ilDB\isReservedWord().

29  {
30  require_once('./Services/Database/classes/MDB2/class.ilDBMySQL.php');
31  $this->assertEquals($is_reserved, ilDBMySQL::isReservedWord($word));
32  }
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 40 of file ilDatabaseReservedWordsTest.php.

References ilDBInterface\isReservedWord().

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

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