Skip to content

Commit 3324dcd

Browse files
committed
Remove defined() from test case
1 parent c9606bd commit 3324dcd

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

@@ -164,22 +164,8 @@ mysqli.allow_local_infile=1
164164
}
165165

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

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

0 commit comments

Comments
 (0)