ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilDatabaseReservedWordsTest.php
Go to the documentation of this file.
1 <?php
2 
9 {
10  protected function setUp()
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  }
21 
22 
29  public function testReservedPDO($word, $is_reserved)
30  {
31  require_once('./Services/Database/classes/PDO/class.ilDBPdoMySQLInnoDB.php');
32  $this->assertEquals($is_reserved, ilDBPdoMySQLInnoDB::isReservedWord($word));
33  }
34 
35 
39  public function reservedData()
40  {
41  return [
42  ['order', true],
43  ['myfield', false],
44  ['number', true],
45  ['null', true],
46  ['sensitive', true],
47  ['usage', true],
48  ['analyze', true],
49  ];
50  }
51 }
global $DIC
Definition: saml.php:7
Class ilDatabaseReservedWordsTest.
testReservedPDO($word, $is_reserved)
reservedData
static isReservedWord($a_word)
global $ilDB
Class ilDBPdoMySQLInnoDB.