|
TYPO3 API
SVNRelease
|
00001 <?php 00002 /*************************************************************** 00003 * Copyright notice 00004 * (c) 2010 Daniel Pötzinger 00005 * (c) 2010 Bastian Waidelich <bastian@typo3.org> 00006 * All rights reserved 00007 * 00008 * This script is part of the TYPO3 project. The TYPO3 project is 00009 * free software; you can redistribute it and/or modify 00010 * it under the terms of the GNU General Public License as published by 00011 * the Free Software Foundation; either version 2 of the License, or 00012 * (at your option) any later version. 00013 * 00014 * The GNU General Public License can be found at 00015 * http://www.gnu.org/copyleft/gpl.html. 00016 * 00017 * This script is distributed in the hope that it will be useful, 00018 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00019 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00020 * GNU General Public License for more details. 00021 * 00022 * This copyright notice MUST APPEAR in all copies of the script! 00023 ***************************************************************/ 00024 00025 require_once(t3lib_extMgm::extPath('extbase') . 'Tests/Unit/Object/Container/Fixtures/Testclasses.php'); 00026 00027 /** 00028 * Testcase for class t3lib_object_ClassInfoFactory. 00029 * 00030 * @author Daniel Pötzinger 00031 * @author Bastian Waidelich <bastian@typo3.org> 00032 * @package TYPO3 00033 * @subpackage t3lib 00034 */ 00035 class Tx_Extbase_Tests_Unit_Object_Container_ClassInfoFactoryTest extends Tx_Extbase_Tests_Unit_BaseTestCase { 00036 00037 /** 00038 * @var Tx_Extbase_Object_Container_ClassInfoFactory 00039 */ 00040 private $classInfoFactory; 00041 00042 /** 00043 * 00044 */ 00045 public function setUp() { 00046 $this->classInfoFactory = new Tx_Extbase_Object_Container_ClassInfoFactory(); 00047 } 00048 00049 /** 00050 * @test 00051 * @expectedException Tx_Extbase_Object_Container_Exception_UnknownObjectException 00052 */ 00053 public function buildClassInfoFromClassNameThrowsExceptionIfGivenClassNameCantBeReflected() { 00054 $this->classInfoFactory->buildClassInfoFromClassName('SomeNonExistingClass'); 00055 } 00056 00057 /** 00058 * @test 00059 */ 00060 public function buildClassInfoDoesNotIncludeInjectSettingsMethodInListOfInjectMethods() { 00061 $classInfo = $this->classInfoFactory->buildClassInfoFromClassName('t3lib_object_tests_class_with_injectsettings'); 00062 $this->assertEquals(array('injectFoo' => 't3lib_object_tests_resolveablecyclic1'), $classInfo->getInjectMethods()); 00063 } 00064 00065 /** 00066 * @test 00067 */ 00068 public function moreTestsNeedToBeWritten() { 00069 $this->markTestIncomplete('More tests need to be written!'); 00070 } 00071 } 00072 ?>
1.8.0