ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
Monolog\Handler\NativeMailerHandlerTest Class Reference
+ Inheritance diagram for Monolog\Handler\NativeMailerHandlerTest:
+ Collaboration diagram for Monolog\Handler\NativeMailerHandlerTest:

Public Member Functions

 testConstructorHeaderInjection ()
 @expectedException InvalidArgumentException More...
 
 testSetterHeaderInjection ()
 @expectedException InvalidArgumentException More...
 
 testSetterArrayHeaderInjection ()
 @expectedException InvalidArgumentException More...
 
 testSetterContentTypeInjection ()
 @expectedException InvalidArgumentException More...
 
 testSetterEncodingInjection ()
 @expectedException InvalidArgumentException More...
 

Additional Inherited Members

- Protected Member Functions inherited from Monolog\TestCase
 getRecord ($level=Logger::WARNING, $message='test', $context=array())
 
 getMultipleRecords ()
 
 getIdentityFormatter ()
 

Detailed Description

Definition at line 16 of file NativeMailerHandlerTest.php.

Member Function Documentation

◆ testConstructorHeaderInjection()

Monolog\Handler\NativeMailerHandlerTest::testConstructorHeaderInjection ( )

@expectedException InvalidArgumentException

Definition at line 21 of file NativeMailerHandlerTest.php.

22 {
23 $mailer = new NativeMailerHandler('spammer@example.org', 'dear victim', "receiver@example.org\r\nFrom: faked@attacker.org");
24 }

◆ testSetterArrayHeaderInjection()

Monolog\Handler\NativeMailerHandlerTest::testSetterArrayHeaderInjection ( )

@expectedException InvalidArgumentException

Definition at line 38 of file NativeMailerHandlerTest.php.

39 {
40 $mailer = new NativeMailerHandler('spammer@example.org', 'dear victim', 'receiver@example.org');
41 $mailer->addHeader(array("Content-Type: text/html\r\nFrom: faked@attacker.org"));
42 }

◆ testSetterContentTypeInjection()

Monolog\Handler\NativeMailerHandlerTest::testSetterContentTypeInjection ( )

@expectedException InvalidArgumentException

Definition at line 47 of file NativeMailerHandlerTest.php.

48 {
49 $mailer = new NativeMailerHandler('spammer@example.org', 'dear victim', 'receiver@example.org');
50 $mailer->setContentType("text/html\r\nFrom: faked@attacker.org");
51 }

◆ testSetterEncodingInjection()

Monolog\Handler\NativeMailerHandlerTest::testSetterEncodingInjection ( )

@expectedException InvalidArgumentException

Definition at line 56 of file NativeMailerHandlerTest.php.

57 {
58 $mailer = new NativeMailerHandler('spammer@example.org', 'dear victim', 'receiver@example.org');
59 $mailer->setEncoding("utf-8\r\nFrom: faked@attacker.org");
60 }

◆ testSetterHeaderInjection()

Monolog\Handler\NativeMailerHandlerTest::testSetterHeaderInjection ( )

@expectedException InvalidArgumentException

Definition at line 29 of file NativeMailerHandlerTest.php.

30 {
31 $mailer = new NativeMailerHandler('spammer@example.org', 'dear victim', 'receiver@example.org');
32 $mailer->addHeader("Content-Type: text/html\r\nFrom: faked@attacker.org");
33 }

The documentation for this class was generated from the following file: