Completed
Push — master ( 5ba1dc...b85ec4 )
by Tomasz
02:09
created

testMissingUnserializationHandlerException()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 6
rs 9.4285
cc 1
eloc 4
nc 1
nop 0
1
<?php
2
namespace Thunder\Serializard\Tests;
3
4
use Thunder\Serializard\Format\ArrayFormat;
5
use Thunder\Serializard\HydratorContainer\HydratorContainer;
6
use Thunder\Serializard\NormalizerContainer\NormalizerContainer;
7
8
/**
9
 * @author Tomasz Kowalczyk <[email protected]>
10
 */
11
class FormatTest extends \PHPUnit_Framework_TestCase
12
{
13
    public function testArrayUnserializeInvalidTypeException()
14
    {
15
        $format = new ArrayFormat();
16
        $this->setExpectedException('RuntimeException');
0 ignored issues
show
Deprecated Code introduced by
The method PHPUnit_Framework_TestCase::setExpectedException() has been deprecated with message: Method deprecated since Release 5.2.0

This method has been deprecated. The supplier of the class has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the method will be removed from the class and what other method or class to use instead.

Loading history...
17
        $format->unserialize(new \stdClass(), 'stdClass', new HydratorContainer());
18
    }
19
20
    public function testMissingUnserializationHandlerException()
21
    {
22
        $format = new ArrayFormat();
23
        $this->setExpectedException('RuntimeException');
0 ignored issues
show
Deprecated Code introduced by
The method PHPUnit_Framework_TestCase::setExpectedException() has been deprecated with message: Method deprecated since Release 5.2.0

This method has been deprecated. The supplier of the class has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the method will be removed from the class and what other method or class to use instead.

Loading history...
24
        $format->unserialize(array(), 'stdClass', new HydratorContainer());
25
    }
26
}
27