You are here

public function FaviconTestCase::testMenu in Favicon 7

Test the return of the hook_menu function.

File

./favicon.test, line 31
Tests for Favicon

Class

FaviconTestCase
@file Tests for Favicon

Code

public function testMenu() {
  $info = module_invoke('favicon', 'menu');
  $this
    ->assertEqual(1, count($info), t('Module defines one menu'));
  $this
    ->assertTrue(isset($info['favicon.ico']), t('Module favicon exists.'));
  $this
    ->assertEqual(isset($info['favicon.ico']['page callback']), 'favicon_shortcut_icon', t('page callback link correct'));
  $this
    ->assertTrue($info['favicon.ico']['access callback'], t('All can access callback'));
  $this
    ->assertEqual($info['favicon.ico']['type'], MENU_CALLBACK, t('callback is menu callback'));
}