OXIESEC PANEL
- Current Dir:
/
/
var
/
www
/
reader
/
aws-ses
/
vendor
/
phpmailer
/
phpmailer
/
test
/
PHPMailer
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
08/14/2024 10:55:57 AM
rwxr-xr-x
📄
AddEmbeddedImageTest.php
6.45 KB
08/14/2024 10:52:59 AM
rw-r--r--
📄
AddStringAttachmentTest.php
5.19 KB
08/14/2024 10:52:59 AM
rw-r--r--
📄
AddStringEmbeddedImageTest.php
5.53 KB
08/14/2024 10:52:59 AM
rw-r--r--
📄
AddrFormatTest.php
2.08 KB
08/14/2024 10:52:59 AM
rw-r--r--
📄
AuthCRAMMD5Test.php
1.54 KB
08/14/2024 10:52:59 AM
rw-r--r--
📄
CustomHeaderTest.php
9.2 KB
08/14/2024 10:52:59 AM
rw-r--r--
📄
DKIMTest.php
9.51 KB
08/14/2024 10:52:59 AM
rw-r--r--
📄
DSNConfiguratorTest.php
6.49 KB
08/14/2024 10:52:59 AM
rw-r--r--
📄
EncodeQTest.php
3.96 KB
08/14/2024 10:52:59 AM
rw-r--r--
📄
EncodeStringTest.php
4.58 KB
08/14/2024 10:52:59 AM
rw-r--r--
📄
FileIsAccessibleTest.php
3.32 KB
08/14/2024 10:53:00 AM
rw-r--r--
📄
FilenameToTypeTest.php
2.22 KB
08/14/2024 10:53:00 AM
rw-r--r--
📄
GenerateIdTest.php
2.63 KB
08/14/2024 10:53:00 AM
rw-r--r--
📄
GetLastMessageIDTest.php
3.32 KB
08/14/2024 10:53:00 AM
rw-r--r--
📄
HasLineLongerThanMaxTest.php
4.69 KB
08/14/2024 10:53:00 AM
rw-r--r--
📄
Html2TextTest.php
9.79 KB
08/14/2024 10:53:00 AM
rw-r--r--
📄
ICalTest.php
4.32 KB
08/14/2024 10:53:00 AM
rw-r--r--
📄
IsPermittedPathTest.php
3.74 KB
08/14/2024 10:53:00 AM
rw-r--r--
📄
IsValidHostTest.php
4.18 KB
08/14/2024 10:53:00 AM
rw-r--r--
📄
LocalizationTest.php
18.51 KB
08/14/2024 10:53:00 AM
rw-r--r--
📄
MailTransportTest.php
3.67 KB
08/14/2024 10:53:00 AM
rw-r--r--
📄
MbPathinfoTest.php
5.74 KB
08/14/2024 10:53:00 AM
rw-r--r--
📄
MimeTypesTest.php
1.93 KB
08/14/2024 10:53:00 AM
rw-r--r--
📄
NormalizeBreaksTest.php
3.62 KB
08/14/2024 10:53:00 AM
rw-r--r--
📄
PHPMailerTest.php
47.39 KB
08/14/2024 10:53:01 AM
rw-r--r--
📄
ParseAddressesTest.php
14.27 KB
08/14/2024 10:53:01 AM
rw-r--r--
📄
PunyencodeAddressTest.php
4.77 KB
08/14/2024 10:53:01 AM
rw-r--r--
📄
QuotedStringTest.php
2.08 KB
08/14/2024 10:53:01 AM
rw-r--r--
📄
ReplyToGetSetClearTest.php
17.23 KB
08/14/2024 10:53:01 AM
rw-r--r--
📄
SetErrorTest.php
5.19 KB
08/14/2024 10:53:01 AM
rw-r--r--
📄
SetFromTest.php
7.08 KB
08/14/2024 10:53:01 AM
rw-r--r--
📄
SetTest.php
2.32 KB
08/14/2024 10:53:01 AM
rw-r--r--
📄
SetWordWrapTest.php
4.01 KB
08/14/2024 10:53:01 AM
rw-r--r--
📄
Utf8CharBoundaryTest.php
1.95 KB
08/14/2024 10:53:01 AM
rw-r--r--
📄
ValidateAddressCustomValidatorTest.php
3.65 KB
08/14/2024 10:53:01 AM
rw-r--r--
📄
ValidateAddressTest.php
17.2 KB
08/14/2024 10:53:01 AM
rw-r--r--
📄
WrapTextTest.php
6.05 KB
08/14/2024 10:53:01 AM
rw-r--r--
📄
XMailerTest.php
2 KB
08/14/2024 10:53:01 AM
rw-r--r--
Editing: MbPathinfoTest.php
Close
<?php /** * PHPMailer - PHP email transport unit tests. * PHP version 5.5. * * @author Marcus Bointon <phpmailer@synchromedia.co.uk> * @author Andy Prevost * @copyright 2012 - 2020 Marcus Bointon * @copyright 2004 - 2009 Andy Prevost * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License */ namespace PHPMailer\Test\PHPMailer; use PHPMailer\PHPMailer\PHPMailer; use Yoast\PHPUnitPolyfills\TestCases\TestCase; /** * Test Multi-byte-safe pathinfo replacement functionality. * * @covers \PHPMailer\PHPMailer\PHPMailer::mb_pathinfo */ final class MbPathinfoTest extends TestCase { /** * Verify retrieving information about a file path when the $options parameter has been passed. * * @dataProvider dataMb_pathinfoWithoutOptions * * @param string $path Path input. * @param string $expected Expected function output. */ public function testMb_pathinfoWithoutOptions($path, $expected) { $result = PHPMailer::mb_pathinfo($path); self::assertSame($expected, $result); } /** * Data provider. * * @return array */ public function dataMb_pathinfoWithoutOptions() { return [ 'Empty string' => [ 'path' => '', 'expected' => [ 'dirname' => '', 'basename' => '', 'extension' => '', 'filename' => '', ], ], 'Unix path with singlebyte filename' => [ 'path' => '/mnt/music/music.mp3', 'expected' => [ 'dirname' => '/mnt/music', 'basename' => 'music.mp3', 'extension' => 'mp3', 'filename' => 'music', ], ], 'Windows path with singlebyte filename' => [ 'path' => 'c:\mnt\music\music.mp3', 'expected' => [ 'dirname' => 'c:\mnt\music', 'basename' => 'music.mp3', 'extension' => 'mp3', 'filename' => 'music', ], ], 'Unix path with multibyte filename' => [ 'path' => '/mnt/files/飛兒樂 團光茫.mp3', 'expected' => [ 'dirname' => '/mnt/files', 'basename' => '飛兒樂 團光茫.mp3', 'extension' => 'mp3', 'filename' => '飛兒樂 團光茫', ], ], 'Windows path with multibyte filename' => [ 'path' => 'c:\mnt\files\飛兒樂 團光茫.mp3', 'expected' => [ 'dirname' => 'c:\mnt\files', 'basename' => '飛兒樂 團光茫.mp3', 'extension' => 'mp3', 'filename' => '飛兒樂 團光茫', ], ], 'Filename, not path, contains spaces' => [ 'path' => 'my file.png', 'expected' => [ 'dirname' => '', 'basename' => 'my file.png', 'extension' => 'png', 'filename' => 'my file', ], ], 'Path, no file name, linux style, contains spaces' => [ 'path' => '/mnt/sub directory/another sub/', 'expected' => [ 'dirname' => '/mnt/sub directory', 'basename' => 'another sub', 'extension' => '', 'filename' => 'another sub', ], ], ]; } /** * Verify retrieving information about a file path when the $options parameter has been passed. * * @dataProvider dataMb_pathinfoWithOptions * * @param int|string $options Input to pass to the $options parameter. * @param string $expected Expected function output. */ public function testMb_pathinfoWithOptions($options, $expected) { $path = '/mnt/files/飛兒樂 團光茫.mp3'; $result = PHPMailer::mb_pathinfo($path, $options); self::assertSame($expected, $result); } /** * Data provider. * * @return array */ public function dataMb_pathinfoWithOptions() { return [ 'Option: PATHINFO_DIRNAME' => [ 'options' => PATHINFO_DIRNAME, 'expected' => '/mnt/files', ], 'Option: PATHINFO_BASENAME' => [ 'options' => PATHINFO_BASENAME, 'expected' => '飛兒樂 團光茫.mp3', ], 'Option: PATHINFO_EXTENSION' => [ 'options' => PATHINFO_EXTENSION, 'expected' => 'mp3', ], 'Option: PATHINFO_FILENAME' => [ 'options' => PATHINFO_FILENAME, 'expected' => '飛兒樂 團光茫', ], 'Option: dirname' => [ 'options' => 'dirname', 'expected' => '/mnt/files', ], 'Option: basename' => [ 'options' => 'basename', 'expected' => '飛兒樂 團光茫.mp3', ], 'Option: extension' => [ 'options' => 'extension', 'expected' => 'mp3', ], 'Option: filename' => [ 'options' => 'filename', 'expected' => '飛兒樂 團光茫', ], ]; } }