/**
  * @covers Navigation::setFromArray
  */
 public function testSetFromArray()
 {
     $navigation = new Navigation();
     $navigation->setFromArray([['title' => 'Test', 'icon' => 'fa fa-user', 'priority' => 500, 'url' => 'http://site.com', 'pages' => [['title' => 'Test3', 'icon' => 'fa fa-user', 'url' => 'http://site.com']]], ['title' => 'Test1', 'icon' => 'fa fa-user', 'priority' => 600, 'url' => 'http://site.com']]);
     $expected = ['0cbc6611f5540bd0809a388dc95a615b' => ['child' => ['b3f66ec1535de7702c38e94408fa4a17' => ['child' => [], 'hasChild' => false, 'id' => '19fa931404bfc619f236396fa99d0cc8', 'title' => 'Test3', 'icon' => '<i class="fa fa-user"></i>', 'priority' => 100, 'url' => 'http://site.com', 'path' => ['Test', 'Test3'], 'isActive' => false, 'attributes' => '', 'badge' => null]], 'hasChild' => true, 'id' => '0cbc6611f5540bd0809a388dc95a615b', 'title' => 'Test', 'icon' => '<i class="fa fa-user"></i>', 'priority' => 500, 'url' => 'http://site.com', 'path' => ['Test'], 'isActive' => false, 'attributes' => ' class="has-child"', 'badge' => null], 'e1b849f9631ffc1829b2e31402373e3c' => ['child' => [], 'hasChild' => false, 'id' => 'e1b849f9631ffc1829b2e31402373e3c', 'title' => 'Test1', 'icon' => '<i class="fa fa-user"></i>', 'priority' => 600, 'url' => 'http://site.com', 'path' => ['Test1'], 'isActive' => false, 'attributes' => '', 'badge' => null]];
     $this->assertEquals($expected, $navigation->toArray());
     $this->assertEquals(3, $navigation->countPages());
     $navigation->setFromArray([['title' => 'Test 4', 'icon' => 'fa fa-user', 'priority' => 700, 'url' => 'http://site.com']]);
     $expected = $expected + ['9fe74bb46baed663321329a1fc479e8b' => ['child' => [], 'hasChild' => false, 'id' => '9fe74bb46baed663321329a1fc479e8b', 'title' => 'Test 4', 'icon' => '<i class="fa fa-user"></i>', 'priority' => 700, 'url' => 'http://site.com', 'path' => ['Test 4'], 'isActive' => false, 'attributes' => '', 'badge' => null]];
     $this->assertEquals(4, $navigation->countPages());
     $this->assertEquals($expected, $navigation->toArray());
 }