-
Notifications
You must be signed in to change notification settings - Fork 25
Extends unit tests for Page and PageFactory #52
Extends unit tests for Page and PageFactory #52
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall, tests look good. I'll switch from annotations to method calls where I indicated elsewhere during merge.
@@ -104,6 +104,54 @@ public function testSetShouldNotMapToSetConfigToPreventRecursion() | |||
$this->assertEquals($options, $page->get('config')); | |||
} | |||
|
|||
/** | |||
* @expectedException \Zend\Navigation\Exception\InvalidArgumentException |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would remove the annotation and place a setExpectedException
/expectException
directive immediately before the call to set()
; otherwise, it's possible that the factory()
method might raise the exception, and we'd not be testing the correct behavior.
I can do this on merge.
} | ||
|
||
/** | ||
* @expectedException \Zend\Navigation\Exception\InvalidArgumentException |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same argument here.
} | ||
|
||
/** | ||
* @expectedException \Zend\Navigation\Exception\InvalidArgumentException |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and here.
} | ||
|
||
/** | ||
* @expectedException \Zend\Navigation\Exception\InvalidArgumentException |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and here.
@@ -1167,4 +1232,18 @@ public function testSetObjectPermission() | |||
$this->assertInstanceOf('stdClass', $page->getPermission()); | |||
$this->assertEquals('my_permission', $page->getPermission()->name); | |||
} | |||
|
|||
/** | |||
* @expectedException \Zend\Navigation\Exception\InvalidArgumentException |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and finally here.
…y-tests Extends unit tests for Page and PageFactory
Thanks, @froschdesign |
No description provided.