mirror of
https://github.com/php/php-src.git
synced 2025-08-20 01:14:28 +02:00
Remove use of case-insensitive constants in tests
This commit is contained in:
parent
70d0175a13
commit
a632ecd224
1 changed files with 4 additions and 4 deletions
|
@ -15,7 +15,7 @@
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
define('file_not_found', 2, 1);
|
const FILE_NOT_FOUND = 2;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Function: bool create_file(string $filename, string $mode = "w");
|
Function: bool create_file(string $filename, string $mode = "w");
|
||||||
|
@ -432,7 +432,7 @@ function create_links($file_path,
|
||||||
Description: delete a given file if exists
|
Description: delete a given file if exists
|
||||||
Returns: true on success
|
Returns: true on success
|
||||||
false on failure
|
false on failure
|
||||||
file_not_found if file doesn't exist
|
FILE_NOT_FOUND if file doesn't exist
|
||||||
*/
|
*/
|
||||||
function delete_file($filename) {
|
function delete_file($filename) {
|
||||||
// check if file exists
|
// check if file exists
|
||||||
|
@ -442,7 +442,7 @@ function delete_file($filename) {
|
||||||
else
|
else
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return file_not_found;
|
return FILE_NOT_FOUND;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -475,7 +475,7 @@ function delete_files($file_path,
|
||||||
$status = delete_file($filename);
|
$status = delete_file($filename);
|
||||||
if($status == true) {
|
if($status == true) {
|
||||||
$return_value['deleted']++;
|
$return_value['deleted']++;
|
||||||
} else if($status == file_not_found) {
|
} else if($status == FILE_NOT_FOUND) {
|
||||||
$return_value['notfound']++;
|
$return_value['notfound']++;
|
||||||
} else {
|
} else {
|
||||||
$return_value['failed']++;
|
$return_value['failed']++;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue