File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -89,7 +89,7 @@ public function stamp() {
8989
9090 public function setId ($ value ) {
9191 if (isset ($ value ) && ! preg_match (Util::UUID_REGEX , $ value )) {
92- throw new \InvalidArgumentException ('arg1 must be a UUID ' );
92+ throw new \InvalidArgumentException ('arg1 must be a UUID " ' . $ value . ' " ' );
9393 }
9494 $ this ->id = $ value ;
9595 return $ this ;
Original file line number Diff line number Diff line change @@ -65,6 +65,16 @@ public function testStamp() {
6565 $ this ->assertRegExp (TinCan \Util::UUID_REGEX , $ obj ->getId (), 'id is UUId ' );
6666 }
6767
68+ public function testSetId () {
69+ $ this ->setExpectedException (
70+ 'InvalidArgumentException ' ,
71+ 'arg1 must be a UUID "some invalid id" '
72+ );
73+
74+ $ obj = new Statement ();
75+ $ obj ->setId ('some invalid id ' );
76+ }
77+
6878 /*
6979 // TODO: need to loop possible configs
7080 public function testFromJSONInstantiations() {
You can’t perform that action at this time.
0 commit comments