Skip to content

Commit 97ee6fc

Browse files
committed
Remove defined() from test case
1 parent 4e0ebe4 commit 97ee6fc

File tree

1 file changed

+3
-17
lines changed

1 file changed

+3
-17
lines changed

ext/mysqli/tests/mysqli_constants.phpt

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -105,15 +105,15 @@ mysqli.allow_local_infile=1
105105
);
106106

107107
/* depends on the build - experimental */
108-
if ($IS_MYSQLND && defined('MYSQLI_OPT_INT_AND_FLOAT_NATIVE')) {
108+
if ($IS_MYSQLND) {
109109
$expected_constants['MYSQLI_OPT_INT_AND_FLOAT_NATIVE'] = true;
110110
}
111111

112-
if ($IS_MYSQLND && defined('MYSQLI_STORE_RESULT_COPY_DATA')) {
112+
if ($IS_MYSQLND) {
113113
$expected_constants['MYSQLI_STORE_RESULT_COPY_DATA'] = true;
114114
}
115115

116-
if ($IS_MYSQLND || defined('MYSQLI_REFRESH_BACKUP_LOG')) {
116+
if ($IS_MYSQLND) {
117117
$expected_constants['MYSQLI_REFRESH_BACKUP_LOG'] = true;
118118
}
119119

@@ -160,22 +160,8 @@ mysqli.allow_local_infile=1
160160
}
161161

162162
/* pretty dump test, but that is the best way to mimic mysql.c */
163-
if (defined('MYSQLI_DATA_TRUNCATED'))
164163
$expected_constants["MYSQLI_DATA_TRUNCATED"] = true;
165164

166-
if (!$IS_MYSQLND) {
167-
/* libmysql only */
168-
169-
/* are they available in all versions of ext/mysqli ?
170-
... no we must have removed them at some point - for BC, weakening the test
171-
*/
172-
if (defined("MYSQLI_RPL_MASTER")) {
173-
$expected_constants["MYSQLI_RPL_MASTER"] = true;
174-
$expected_constants["MYSQLI_RPL_SLAVE"] = true;
175-
$expected_constants["MYSQLI_RPL_ADMIN"] = true;
176-
}
177-
}
178-
179165
if ($IS_MYSQLND || (!$IS_MYSQLND && ($version > 50610))) {
180166
/* could be that MySQL/libmysql 5.6.9 had the flag already but it was no stable release */
181167
$expected_constants["MYSQLI_OPT_CAN_HANDLE_EXPIRED_PASSWORDS"] = true;

0 commit comments

Comments
 (0)