Explorar el Código

Fixed Zend_Navigation_Page_MvcTest::testToArrayMethod()

- it now properly uses assertEquals to compare arrays instead of array_diff_assoc() which does not compare the array recursively
Martin Hujer hace 12 años
padre
commit
133e31c279
Se han modificado 1 ficheros con 8 adiciones y 2 borrados
  1. 8 2
      tests/Zend/Navigation/Page/MvcTest.php

+ 8 - 2
tests/Zend/Navigation/Page/MvcTest.php

@@ -643,9 +643,11 @@ class Zend_Navigation_Page_MvcTest extends PHPUnit_Framework_TestCase
     public function testToArrayMethod()
     {
         $options = array(
+            'accesskey'  => null,
             'label'      => 'foo',
             'action'     => 'index',
             'controller' => 'index',
+            'customHtmlAttribs' => array(),
             'module'     => 'test',
             'fragment'   => 'bar',
             'id'         => 'my-id',
@@ -653,6 +655,7 @@ class Zend_Navigation_Page_MvcTest extends PHPUnit_Framework_TestCase
             'title'      => 'my-title',
             'target'     => 'my-target',
             'order'      => 100,
+            'pages'      => array(),
             'active'     => true,
             'visible'    => false,
             'encodeUrl'  => false,
@@ -668,12 +671,15 @@ class Zend_Navigation_Page_MvcTest extends PHPUnit_Framework_TestCase
         $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(
-            array(),
-            array_diff_assoc($options, $page->toArray())
+            $options,
+            $toArray
         );
     }