示例#1
0
 public function testSetVisibleShouldJuggleValue()
 {
     $page = new Zend_Navigation_Page_Uri();
     $page->setVisible(1);
     $this->assertTrue($page->isVisible());
     $page->setVisible('true');
     $this->assertTrue($page->isVisible());
     $page->setVisible(0);
     $this->assertFalse($page->isVisible());
     /**
      * ZF-10146
      * 
      * @link http://framework.zend.com/issues/browse/ZF-10146
      */
     $page->setVisible('False');
     $this->assertFalse($page->isVisible());
     $page->setVisible(array());
     $this->assertFalse($page->isVisible());
 }
示例#2
0
文件: PageTest.php 项目: netvlies/zf
 public function testSetVisibleShouldJuggleValue()
 {
     $page = new Zend_Navigation_Page_Uri();
     $page->setVisible(1);
     $this->assertTrue($page->isVisible());
     $page->setVisible('true');
     $this->assertTrue($page->isVisible());
     $page->setVisible(0);
     $this->assertFalse($page->isVisible());
     $page->setVisible(array());
     $this->assertFalse($page->isVisible());
 }