File tree Expand file tree Collapse file tree 1 file changed +18
-4
lines changed Expand file tree Collapse file tree 1 file changed +18
-4
lines changed Original file line number Diff line number Diff line change 18
18
*/
19
19
class MaxDepthTest extends \PHPUnit_Framework_TestCase
20
20
{
21
+ /**
22
+ * @expectedException \Symfony\Component\Serializer\Exception\InvalidArgumentException
23
+ */
24
+ public function testNotSetMaxDepthParameter ()
25
+ {
26
+ new MaxDepth (array ());
27
+ }
28
+
29
+ /**
30
+ * @expectedException \Symfony\Component\Serializer\Exception\InvalidArgumentException
31
+ */
32
+ public function testEmptyMaxDepthParameter ()
33
+ {
34
+ new MaxDepth (array ('value ' => '' ));
35
+ }
36
+
21
37
/**
22
38
* @expectedException \Symfony\Component\Serializer\Exception\InvalidArgumentException
23
39
*/
@@ -28,9 +44,7 @@ public function testNotAnIntMaxDepthParameter()
28
44
29
45
public function testMaxDepthParameters ()
30
46
{
31
- $ validData = 3 ;
32
-
33
- $ groups = new MaxDepth (array ('value ' => 3 ));
34
- $ this ->assertEquals ($ validData , $ groups ->getMaxDepth ());
47
+ $ maxDepth = new MaxDepth (array ('value ' => 3 ));
48
+ $ this ->assertEquals (3 , $ maxDepth ->getMaxDepth ());
35
49
}
36
50
}
You can’t perform that action at this time.
0 commit comments