Skip to content
This repository has been archived by the owner on Jan 30, 2020. It is now read-only.

Extends unit tests for Page and PageFactory #52

Conversation

froschdesign
Copy link
Member

No description provided.

@froschdesign froschdesign added this to the 2.8.2 milestone Feb 22, 2017
Copy link
Member

@weierophinney weierophinney left a 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
Copy link
Member

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
Copy link
Member

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
Copy link
Member

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
Copy link
Member

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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and finally here.

@weierophinney weierophinney merged commit 364e277 into zendframework:master Mar 22, 2017
weierophinney added a commit that referenced this pull request Mar 22, 2017
…y-tests

Extends unit tests for Page and PageFactory
weierophinney added a commit that referenced this pull request Mar 22, 2017
weierophinney added a commit that referenced this pull request Mar 22, 2017
@weierophinney
Copy link
Member

Thanks, @froschdesign

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants