Tests/reorganize: move property setting tests to own file

This commit is contained in:
jrfnl 2021-07-12 03:20:19 +02:00
parent 1265af38ea
commit d4ff9fdd54
2 changed files with 34 additions and 4 deletions

View File

@ -1057,10 +1057,6 @@ EOT;
$this->Mail->setLanguage('fr');
$this->Mail->Sender = '';
$this->Mail->createHeader();
self::assertFalse($this->Mail->set('x', 'y'), 'Invalid property set succeeded');
self::assertTrue($this->Mail->set('Timeout', 11), 'Valid property set failed');
self::assertTrue($this->Mail->set('AllowEmpty', null), 'Null property set failed');
self::assertTrue($this->Mail->set('AllowEmpty', false), 'Valid property set of null property failed');
}
public function testBadSMTP()

View File

@ -0,0 +1,34 @@
<?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\Test\TestCase;
/**
* Test property setting functionality.
*/
final class SetTest extends TestCase
{
/**
* Miscellaneous calls to improve test coverage and some small tests.
*/
public function testMiscellaneous()
{
self::assertFalse($this->Mail->set('x', 'y'), 'Invalid property set succeeded');
self::assertTrue($this->Mail->set('Timeout', 11), 'Valid property set failed');
self::assertTrue($this->Mail->set('AllowEmpty', null), 'Null property set failed');
self::assertTrue($this->Mail->set('AllowEmpty', false), 'Valid property set of null property failed');
}
}