SetTest: split off failure test
This commit moves the "failed to set the property" test case to a separate test method.
This commit is contained in:
parent
d4ff9fdd54
commit
eef6f4e52a
|
|
@ -26,9 +26,23 @@ final class SetTest extends TestCase
|
|||
*/
|
||||
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');
|
||||
}
|
||||
|
||||
/**
|
||||
* Test setting the value of a class property which doesn't exist.
|
||||
*/
|
||||
public function testSetInvalidProperty()
|
||||
{
|
||||
self::assertFalse($this->Mail->set('x', 'y'), 'Invalid property set succeeded');
|
||||
|
||||
// Verify that an error has been registered.
|
||||
self::assertSame(
|
||||
'Cannot set or reset variable: x',
|
||||
$this->Mail->ErrorInfo,
|
||||
'Error info not correctly registered'
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue