Exemple #1
0
 public function testToArrayMethod()
 {
     $options = array('label' => 'foo', 'action' => 'index', 'controller' => 'index', 'module' => 'test', 'fragment' => 'bar', 'id' => 'my-id', 'class' => 'my-class', 'title' => 'my-title', 'target' => 'my-target', 'order' => 100, 'active' => true, 'visible' => false, 'encodeUrl' => false, 'scheme' => 'https', 'foo' => 'bar', 'meaning' => 42);
     $page = new Zend_Navigation_Page_Mvc($options);
     $toArray = $page->toArray();
     $options['reset_params'] = true;
     $options['route'] = null;
     $options['params'] = array();
     $options['rel'] = array();
     $options['rev'] = array();
     $this->assertEquals(array(), array_diff_assoc($options, $page->toArray()));
 }
 public function testToArrayMethod()
 {
     $options = array('accesskey' => null, 'label' => 'foo', 'action' => 'index', 'controller' => 'index', 'customHtmlAttribs' => array(), 'module' => 'test', 'fragment' => 'bar', 'id' => 'my-id', 'class' => 'my-class', 'title' => 'my-title', 'target' => 'my-target', 'order' => 100, 'pages' => array(), 'active' => true, 'visible' => false, 'encodeUrl' => false, 'scheme' => 'https', 'foo' => 'bar', 'meaning' => 42);
     $page = new Zend_Navigation_Page_Mvc($options);
     $toArray = $page->toArray();
     $options['reset_params'] = true;
     $options['route'] = null;
     $options['params'] = array();
     $options['privilege'] = null;
     $options['rel'] = array();
     $options['resource'] = null;
     $options['rev'] = array();
     $options['type'] = 'Zend_Navigation_Page_Mvc';
     $this->assertEquals($options, $toArray);
 }