Changeset 408
- Timestamp:
- 03/21/07 16:08:06 (2 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/src/main/php/_test/TestXMLPageElement.php
r288 r408 29 29 return array('foo' => 'Hello World!'); 30 30 } 31 32 /** 33 * returns a list of form values 34 * 35 * @param stubRequest $request 36 * @return array<string,string> 37 */ 38 public function getFormValues(stubRequest $request) 39 { 40 return array(); 41 } 31 42 } 32 43 ?> trunk/src/main/php/net/stubbles/reflection/stubReflectionClass.php
r255 r408 42 42 public function __construct($className) 43 43 { 44 if (strstr($className, '.') !== false) { 45 $nqClassName = stubClassLoader::getNonQualifiedClassName($className); 46 if (class_exists($nqClassName, false) == false) { 47 stubClassLoader::load($className); 48 } 49 50 $className = $nqClassName; 51 } 44 52 $this->className = $className; 45 53 parent::__construct($className); trunk/src/test/php/net/stubbles/reflection/stubReflectionClassTestCase.php
r255 r408 9 9 stubClassLoader::load('net.stubbles.reflection.stubReflectionClass'); 10 10 require_once dirname(__FILE__) . '/stubreflectiontestclasses.php'; 11 class stubTestFullLoading {} 11 12 /** 12 13 * Test for stubReflectionClass. … … 178 179 $this->assertIsA($refClass->getExtension(), 'stubReflectionExtension'); 179 180 } 181 182 /** 183 * test that class loading works as expected 184 */ 185 public function testClassLoading() 186 { 187 $refClass = new stubReflectionClass('examples.stubTestFullLoading'); 188 $this->assertEqual($refClass->getFullQualifiedClassName(), 'stubTestFullLoading'); 189 $refClass = new stubReflectionClass('_test.TestXMLPageElement'); 190 $this->assertEqual($refClass->getFullQualifiedClassName(), '_test.TestXMLPageElement'); 191 } 180 192 } 181 193 ?>
