Hoa central
Public Member Functions | List of all members
Hoa\Mail\Test\Unit\Content\Encoder\Base64 Class Reference
Inheritance diagram for Hoa\Mail\Test\Unit\Content\Encoder\Base64:

Public Member Functions

 case_basic_encode ()
 
 case_long_encode ()
 
 case_encode_rfc2047_sections_4_and_5 ()
 
- Public Member Functions inherited from Hoa\Test\Unit\Suite
 __construct ()
 
 getTestedClassName ()
 
 getTestedClassNamespace ()
 
 beforeTestMethod ($methodName)
 

Detailed Description

Class .

Test suite of the base64 encoder.

Definition at line 50 of file Base64.php.

Member Function Documentation

Hoa\Mail\Test\Unit\Content\Encoder\Base64::case_basic_encode ( )

Definition at line 52 of file Base64.php.

53  {
54  $this
55  ->given(
56  $decoded = 'foobar',
57  $encoded = 'Zm9vYmFy'
58  )
59  ->when($result = SUT::encode($decoded))
60  ->then
61  ->string($result)
62  ->isEqualTo($encoded);
63  }
Hoa\Mail\Test\Unit\Content\Encoder\Base64::case_encode_rfc2047_sections_4_and_5 ( )

Definition at line 81 of file Base64.php.

82  {
83  $this
84  ->given(
85  $decoded = 'foobar',
86  $encoded = '=?utf-8?B?Zm9vYmFy?='
87  )
88  ->when($result = SUT::encode($decoded, true))
89  ->then
90  ->string($result)
91  ->isEqualTo($encoded);
92  }
Hoa\Mail\Test\Unit\Content\Encoder\Base64::case_long_encode ( )

Definition at line 65 of file Base64.php.

66  {
67  $this
68  ->given(
69  $decoded = str_repeat('foobar', 15),
70  $encoded =
71  'Zm9vYmFyZm9vYmFyZm9vYmFyZm9vYmFyZm9vYmFyZm9vYmFyZm9v' .
72  'YmFyZm9vYmFyZm9vYmFyZm9v' . CRLF .
73  'YmFyZm9vYmFyZm9vYmFyZm9vYmFyZm9vYmFyZm9vYmFy'
74  )
75  ->when($result = SUT::encode($decoded))
76  ->then
77  ->string($result)
78  ->isEqualTo($encoded);
79  }

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