|
@@ 44-50 (lines=7) @@
|
| 41 |
|
$this->assertEqualsWithDelta($output['timestamp'], time(), 3); |
| 42 |
|
} |
| 43 |
|
|
| 44 |
|
public function testTransformerNotFoundExceptionClass() |
| 45 |
|
{ |
| 46 |
|
$transformer = new Transformer([]); |
| 47 |
|
$this->expectException(TransformerNotFoundException::class); |
| 48 |
|
$this->expectExceptionMessage('No transformer found for "stdClass"'); |
| 49 |
|
$output = $transformer->toArray(new \stdClass()); |
| 50 |
|
} |
| 51 |
|
|
| 52 |
|
public function testTransformerNotFoundExceptionInteger() |
| 53 |
|
{ |
|
@@ 52-58 (lines=7) @@
|
| 49 |
|
$output = $transformer->toArray(new \stdClass()); |
| 50 |
|
} |
| 51 |
|
|
| 52 |
|
public function testTransformerNotFoundExceptionInteger() |
| 53 |
|
{ |
| 54 |
|
$transformer = new Transformer([]); |
| 55 |
|
$this->expectException(TransformerNotFoundException::class); |
| 56 |
|
$this->expectExceptionMessage('No transformer found for "integer"'); |
| 57 |
|
$output = $transformer->toArray(4711); |
| 58 |
|
} |
| 59 |
|
|
| 60 |
|
public function testTransformerNotFoundExceptionEnvelope() |
| 61 |
|
{ |
|
@@ 60-66 (lines=7) @@
|
| 57 |
|
$output = $transformer->toArray(4711); |
| 58 |
|
} |
| 59 |
|
|
| 60 |
|
public function testTransformerNotFoundExceptionEnvelope() |
| 61 |
|
{ |
| 62 |
|
$transformer = new Transformer([]); |
| 63 |
|
$this->expectException(TransformerNotFoundException::class); |
| 64 |
|
$this->expectExceptionMessage('No transformer found for "Envelope<stdClass>"'); |
| 65 |
|
$output = $transformer->toArray(new Envelope(new \stdClass())); |
| 66 |
|
} |
| 67 |
|
} |
| 68 |
|
|