59 : void
60 {
61 $raised = false;
62 try {
63 $with = null;
64 $next_with = $this->add_label->transform($with);
65 }
catch (InvalidArgumentException
$e) {
66 $raised = true;
67 }
68 $this->assertTrue($raised);
69
70 $raised = false;
71 try {
72 $without = [1, 2, 3, 4];
73 $with = $this->add_label->transform($without);
74 }
catch (InvalidArgumentException
$e) {
75 $raised = true;
76 }
77 $this->assertTrue($raised);
78
79 $raised = false;
80 try {
81 $without = "1, 2, 3";
82 $with = $this->add_label->transform($without);
83 }
catch (InvalidArgumentException
$e) {
84 $raised = true;
85 }
86 $this->assertTrue($raised);
87
88 $raised = false;
89 try {
90 $std_class = new stdClass();
91 $with = $this->add_label->transform($std_class);
92 }
catch (InvalidArgumentException
$e) {
93 $raised = true;
94 }
95 $this->assertTrue($raised);
96 }