0
0
mirror of https://github.com/PHPMailer/PHPMailer.git synced 2024-09-20 01:52:15 +02:00

Fix bugs in POP3 test

runfakepopserver.sh expects fakepopserver.sh to be in the working
directory, therefore the tests in PopBeforeSmtpTest have to chdir()
to the test directory first.

The line in fakepopserver.sh echoing Bye needed -en arguments for
echo to process character escapes.
This commit is contained in:
Czirkos Zoltan 2022-10-26 20:18:42 +02:00
parent b4b493c8f3
commit c6e066d061
2 changed files with 6 additions and 2 deletions

View File

@ -42,7 +42,7 @@ final class PopBeforeSmtpTest extends TestCase
* Set up default include path.
* Default to the dir above the test dir, i.e. the project home dir.
*/
define('PHPMAILER_INCLUDE_DIR', dirname(__DIR__));
define('PHPMAILER_INCLUDE_DIR', dirname(dirname(__DIR__)));
}
}
@ -54,6 +54,10 @@ final class PopBeforeSmtpTest extends TestCase
if (DIRECTORY_SEPARATOR === '\\') {
$this->markTestSkipped('This test needs a non-Windows OS to run');
}
// Chdir to test directory as runfakepopserver.sh runs fakepopserver.sh
// from its working directory.
chdir(PHPMAILER_INCLUDE_DIR . "/test");
}
/**

View File

@ -123,4 +123,4 @@ while [ ${BREAK} -eq 0 ] ; do
fi
done
echo "+OK Bye!\r\n"
echo -en "+OK Bye!\r\n"