1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-08 07:36:32 +02:00

15 Commits

Author SHA1 Message Date
camer0n
1b54602be1 Issue #5443 - PHP 8.4 test fixes. 2025-03-17 13:44:04 -07:00
Nick Liu
c68604b971 Don't assume an empty table in e_db_abstractTest::testIsEmpty() 2021-04-13 15:03:36 -05:00
Nick Liu
99aa39a8e5 e107_tests: Removed usages of var_dump() 2021-04-13 15:03:36 -05:00
Cameron
2904f1e792 All Unit tests passing locally. 2021-03-31 12:11:23 -07:00
Nick Liu
f256b924ce Fix all PHP 8.0 test failures 2020-11-30 12:55:00 +01:00
Cameron
5471a84746 Fixes #4111 Inconsistent results under some circumstances with e107::getDb()->retrieve(). Tests have been added to this commit. 2020-03-13 15:06:26 -07:00
Nick Liu
8b354adf44 Don't spam database server with connections
- MOD: Silently ignore failures to e_db_mysql::close(); if it's failing, it's probably already closed
- FIX: Close the PDO or mysqli connection after each e_db_abstractTest test
- MOD: Changed class2.php's $sql variable to be hinted as an e_db instead of e_db_mysql
2020-01-19 14:33:11 +01:00
Nick Liu
72d3f07410 PHP 5.6 fixes for e_db_mysql
- FIX: Don't redefine MYSQL_* constants in e_db_pdo_class.php
- FIX: e_db_mysql::rowCount() could try to use mysql_num_rows() to count rows of a non-resource
- FIX: e_db_mysql::delete() stores the number of deleted rows in e_db_mysql::$mySQLrows
- FIX: e_db_abstractTest::testDb_Query() was fetching in PDO mode but shouldn't have been
- FIX: Typos in e_db_abstractTest::testDelete()
- MOD: Moved PDO-exclusive testBackup() from e_db_abstractTest to e_db_pdoTest
- FIX: e_db_mysqlTest now works in PHP 5.6 if the main e_db instance was in PDO mode but the test
       class initializes in legacy mode
- MOD: e_db_mysqlTest now asserts that PDO mode is not in use
- FIX: e_db_mysqlTest::testGetServerInfo() should now actually get a version number
- FIX: e_db_mysqlTest::testGetLastErrorNumber() has a different error code compared to PDO
- FIX: e_db_mysqlTest::testEscape() should actually get something from mysql_real_escape_string()
2020-01-19 12:30:23 +01:00
Nick Liu
91660a2c32 Test isolation fixes for e_db_abstractTest
Also needed a null check in e_db_pdo::db_Query()
2020-01-18 16:35:18 +01:00
Nick Liu
46b541889f Fixed array key absence check in e_db_abstractTest::testDb_Fetch() 2020-01-18 16:35:17 +01:00
Nick Liu
29999eed6d Updated to Codeception 4.0 2019-12-23 19:51:18 +01:00
Nick Liu
f2edd94ea4 Fixed e_db_abstractTest::testDb_Select_gen() UPDATE query
A previous test may have changed the value so that the update would not have changed anything.
2019-12-23 18:40:18 +01:00
Nick Liu
9b59527b3d Moved PDO-exclusive features from e_db_abstractTest to e_db_pdoTest
e_db_pdoTest::testSelectBind()
e_db_pdoTest::testDb_QueryBind()
e_db_pdoTest::testDb_CopyRowUnique()
2019-12-23 18:34:16 +01:00
Nick Liu
9677db1c1c Removed bad e_LEGACY_MODE implementation
e_LEGACY_MODE caused the query results from e_db_pdo and e_db_mysql to return different styles (MYSQL_BOTH and MYSQL_ASSOC, respectively).

To resolve this inconsistency, e_LEGACY_MODE has been removed from the e107 core.
2019-12-23 16:50:33 +01:00
Nick Liu
71e7f8778c Merged e_db_mysql and e_db_pdo tests into e_db_abstractTest
- FIX: e_db::copyTable() is now an interface
- FIX: e_db_mysql now implements e_db
- FIX: Implemented missing e_db_mysql::copyTable() public method
- FIX: Implemented missing e_db_mysql::setLanguage() method
- FIX: Implemented missing e_db_mysql::getLanguage() method
- FIX: Implemented missing e_db_mysql::dropTable() method
- MOD: Merged e_db_mysqlTest and e_db_pdoTest into e_db_abstractTest
2019-12-23 16:37:48 +01:00