public function testIsActive_withAnotherUri_shouldReturnFalse() { // // @conditions // $currentUri = 'http://localhost/another'; $menu = new MenuItem(['name' => 'home', 'label' => 'Home', 'link' => '/home', 'rule' => function (MenuItemContract $item) { return (bool) preg_match('#home$#', $item->getUri()); }]); $menu->setUri($currentUri); $result = $menu->isActive(); // // @asserts // $this->assertFalse($result); }