TYPO3 CMS  TYPO3_6-2
MenuContentObjectFactoryTest.php
Go to the documentation of this file.
1 <?php
3 
23 
29  $factory = new \TYPO3\CMS\Frontend\ContentObject\Menu\MenuContentObjectFactory;
30  $factory->getMenuObjectByType($this->getUniqueId('foo_'));
31  }
32 
37  $factory = new \TYPO3\CMS\Frontend\ContentObject\Menu\MenuContentObjectFactory;
38  $this->assertInternalType('object', $factory->getMenuObjectByType('GMENU'));
39  }
40 
45  $factory = new \TYPO3\CMS\Frontend\ContentObject\Menu\MenuContentObjectFactory;
46  $this->assertInternalType('object', $factory->getMenuObjectByType('gmenu'));
47  }
48 
53  $factory = new \TYPO3\CMS\Frontend\ContentObject\Menu\MenuContentObjectFactory;
54  $selfClassName = get_class($this);
55  $factory->registerMenuType('GMENU', $selfClassName);
56  $this->assertInstanceOf($selfClassName, $factory->getMenuObjectByType('GMENU'));
57  }
58 
63  $factory = new \TYPO3\CMS\Frontend\ContentObject\Menu\MenuContentObjectFactory;
64  $selfClassName = get_class($this);
65  $uniqueMenuType = $this->getUniqueId('foo_');
66  $factory->registerMenuType($uniqueMenuType, $selfClassName);
67  $this->assertInstanceOf($selfClassName, $factory->getMenuObjectByType($uniqueMenuType));
68  }
69 
75  $factory = new \TYPO3\CMS\Frontend\ContentObject\Menu\MenuContentObjectFactory;
76  $factory->registerMenuType(array(), 'foo');
77  }
78 
84  $factory = new \TYPO3\CMS\Frontend\ContentObject\Menu\MenuContentObjectFactory;
85  $factory->registerMenuType('foo', array());
86  }
87 }