83 {
84 $add_label = $this->f->addLabels(self::$labels);
85
86 $raised = false;
87 try {
88 $with = null;
89 $next_with = $add_label($with);
90 } catch (InvalidArgumentException $e) {
91 $raised = true;
92 }
93 $this->assertTrue($raised);
94
95 $raised = false;
96 try {
97 $without = array(1, 2, 3, 4);
98 $with = $add_label($without);
99 } catch (InvalidArgumentException $e) {
100 $raised = true;
101 }
102 $this->assertTrue($raised);
103
104 $raised = false;
105 try {
106 $without = "1, 2, 3";
107 $with = $add_label($without);
108 } catch (InvalidArgumentException $e) {
109 $raised = true;
110 }
111 $this->assertTrue($raised);
112
113 $raised = false;
114 try {
115 $std_class = new stdClass();
116 $with = $add_label($std_class);
117 } catch (InvalidArgumentException $e) {
118 $raised = true;
119 }
120 $this->assertTrue($raised);
121 }