| Total Complexity | 4 |
| Total Lines | 41 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 10 | class ToStringTest extends CommonTestClass |
||
| 11 | { |
||
| 12 | /** |
||
| 13 | * @throws MimeException |
||
| 14 | */ |
||
| 15 | public function testNone1(): void |
||
| 16 | { |
||
| 17 | $lib = new XToString(); |
||
| 18 | $this->expectException(MimeException::class); |
||
| 19 | $lib->convert('file', false); |
||
|
|
|||
| 20 | } |
||
| 21 | |||
| 22 | /** |
||
| 23 | * @throws MimeException |
||
| 24 | */ |
||
| 25 | public function testNone2(): void |
||
| 26 | { |
||
| 27 | $lib = new XToString(); |
||
| 28 | $this->expectException(MimeException::class); |
||
| 29 | $lib->convert('file', null); |
||
| 30 | } |
||
| 31 | |||
| 32 | /** |
||
| 33 | * @throws MimeException |
||
| 34 | */ |
||
| 35 | public function testString(): void |
||
| 36 | { |
||
| 37 | $lib = new XToString(); |
||
| 38 | $this->assertEquals('test data', $lib->convert('data', 'test data')); |
||
| 39 | $this->assertEquals('123456', $lib->convert('nums', 123456)); |
||
| 40 | } |
||
| 41 | |||
| 42 | /** |
||
| 43 | * @throws MimeException |
||
| 44 | */ |
||
| 45 | public function testResource(): void |
||
| 51 | } |
||
| 52 | } |
||
| 53 |