Changeset 1711
- Timestamp:
- 07/16/08 16:29:37 (1 month ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
framework/trunk/src/test/php/net/stubbles/xml/xsl/util/stubXSLImageDimensionsTestCase.php
r1703 r1711 7 7 * @subpackage xml_xsl_util_test 8 8 */ 9 stubClassLoader::load('net::stubbles::xml::xsl::util::stubXSLImageDimensions', 9 stubClassLoader::load('net::stubbles::ioc::annotations::stubInjectAnnotation', 10 'net::stubbles::xml::xsl::util::stubXSLImageDimensions', 11 'net::stubbles::xml::xsl::stubXSLMethodAnnotation', 10 12 'net::stubbles::xml::stubDomXMLStreamWriter' 11 13 ); … … 32 34 */ 33 35 protected $mockXMLStreamWriter; 34 36 35 37 /** 36 38 * set up test environment … … 41 43 $this->xslImageDimensions = new stubXSLImageDimensions($this->mockXMLStreamWriter); 42 44 } 43 45 46 /** 47 * make sure annotations are present 48 * 49 * @test 50 */ 51 public function annotationsPresent() 52 { 53 $this->assertTrue($this->xslImageDimensions 54 ->getClass() 55 ->getConstructor() 56 ->hasAnnotation('Inject') 57 ); 58 $this->assertTrue($this->xslImageDimensions 59 ->getClass() 60 ->getMethod('getImageDimensions') 61 ->hasAnnotation('XSLMethod') 62 ); 63 } 64 44 65 /** 45 66 * test that a non-existing file throws a stubXSLCallbackException … … 52 73 $this->xslImageDimensions->getImageDimensions(TEST_SRC_PATH . '/resources/img/doesNotExist.jpg'); 53 74 } 54 75 55 76 /** 56 77 * test that an invalid file throws a stubXSLCallbackException … … 63 84 $this->xslImageDimensions->getImageDimensions(TEST_SRC_PATH . '/resources/img/invalid.gif'); 64 85 } 65 86 66 87 /** 67 88 * test that a correct image delivers correct data framework/trunk/src/test/php/net/stubbles/xml/xsl/util/stubXSLRequestParamsTestCase.php
r1710 r1711 7 7 * @subpackage xml_xsl_util_test 8 8 */ 9 stubClassLoader::load('net::stubbles::xml::xsl::util::stubXSLRequestParams', 9 stubClassLoader::load('net::stubbles::ioc::annotations::stubInjectAnnotation', 10 'net::stubbles::xml::xsl::util::stubXSLRequestParams', 11 'net::stubbles::xml::xsl::stubXSLMethodAnnotation', 10 12 'net::stubbles::xml::stubDomXMLStreamWriter' 11 13 ); … … 48 50 $this->xslRequestParams = new stubXSLRequestParams($this->mockXMLStreamWriter); 49 51 $this->xslRequestParams->setRequest($this->mockRequest); 52 } 53 54 /** 55 * make sure annotations are present 56 * 57 * @test 58 */ 59 public function annotationsPresent() 60 { 61 $this->assertTrue($this->xslRequestParams 62 ->getClass() 63 ->getConstructor() 64 ->hasAnnotation('Inject') 65 ); 66 $this->assertTrue($this->xslRequestParams 67 ->getClass() 68 ->getMethod('setRequest') 69 ->hasAnnotation('Inject') 70 ); 71 $this->assertTrue($this->xslRequestParams 72 ->getClass() 73 ->getMethod('getQueryString') 74 ->hasAnnotation('XSLMethod') 75 ); 50 76 } 51 77
