From b6d652e391923c77a7553101348ccec0d6e60b9a Mon Sep 17 00:00:00 2001 From: nigel lundsten Date: Wed, 20 Feb 2013 13:37:13 -0700 Subject: [PATCH 1/2] add unit test --- test/ContainerTest.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/test/ContainerTest.php b/test/ContainerTest.php index 4951fcc..87f8c2d 100644 --- a/test/ContainerTest.php +++ b/test/ContainerTest.php @@ -114,6 +114,19 @@ public function testConstructorShouldThrowExceptionOnInvalidArgument() } } + public function testAddPagesWithNullValueSkipsPage() + { + $nav = new Navigation\Navigation(array( + array( + 'label' => 'Page 1', + 'uri' => '#' + ), + null + )); + $count = count($nav->getPages()); + $this->assertEquals(1, $count); + } + public function testIterationShouldBeOrderAware() { $nav = new Navigation\Navigation(array( From 73dac831063f0019f4aa1a9a9cbd011608075a64 Mon Sep 17 00:00:00 2001 From: Matthew Weier O'Phinney Date: Mon, 11 Mar 2013 12:48:36 -0500 Subject: [PATCH 2/2] [zendframework/zf2#3840] Added group annotations to new test - per comment from @Freeaqingme --- test/ContainerTest.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/ContainerTest.php b/test/ContainerTest.php index 87f8c2d..9b79668 100644 --- a/test/ContainerTest.php +++ b/test/ContainerTest.php @@ -114,6 +114,10 @@ public function testConstructorShouldThrowExceptionOnInvalidArgument() } } + /** + * @group 3823 + * @group 3840 + */ public function testAddPagesWithNullValueSkipsPage() { $nav = new Navigation\Navigation(array(