Changeset 1711

Show
Ignore:
Timestamp:
07/16/08 16:29:37 (1 month ago)
Author:
mikey
Message:

make sure annotations are present

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • framework/trunk/src/test/php/net/stubbles/xml/xsl/util/stubXSLImageDimensionsTestCase.php

    r1703 r1711  
    77 * @subpackage  xml_xsl_util_test 
    88 */ 
    9 stubClassLoader::load('net::stubbles::xml::xsl::util::stubXSLImageDimensions', 
     9stubClassLoader::load('net::stubbles::ioc::annotations::stubInjectAnnotation', 
     10                      'net::stubbles::xml::xsl::util::stubXSLImageDimensions', 
     11                      'net::stubbles::xml::xsl::stubXSLMethodAnnotation', 
    1012                      'net::stubbles::xml::stubDomXMLStreamWriter' 
    1113); 
     
    3234     */ 
    3335    protected $mockXMLStreamWriter; 
    34      
     36 
    3537    /** 
    3638     * set up test environment 
     
    4143        $this->xslImageDimensions  = new stubXSLImageDimensions($this->mockXMLStreamWriter); 
    4244    } 
    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 
    4465    /** 
    4566     * test that a non-existing file throws a stubXSLCallbackException 
     
    5273        $this->xslImageDimensions->getImageDimensions(TEST_SRC_PATH . '/resources/img/doesNotExist.jpg'); 
    5374    } 
    54      
     75 
    5576    /** 
    5677     * test that an invalid file throws a stubXSLCallbackException 
     
    6384        $this->xslImageDimensions->getImageDimensions(TEST_SRC_PATH . '/resources/img/invalid.gif'); 
    6485    } 
    65      
     86 
    6687    /** 
    6788     * test that a correct image delivers correct data 
  • framework/trunk/src/test/php/net/stubbles/xml/xsl/util/stubXSLRequestParamsTestCase.php

    r1710 r1711  
    77 * @subpackage  xml_xsl_util_test 
    88 */ 
    9 stubClassLoader::load('net::stubbles::xml::xsl::util::stubXSLRequestParams', 
     9stubClassLoader::load('net::stubbles::ioc::annotations::stubInjectAnnotation', 
     10                      'net::stubbles::xml::xsl::util::stubXSLRequestParams', 
     11                      'net::stubbles::xml::xsl::stubXSLMethodAnnotation', 
    1012                      'net::stubbles::xml::stubDomXMLStreamWriter' 
    1113); 
     
    4850        $this->xslRequestParams    = new stubXSLRequestParams($this->mockXMLStreamWriter); 
    4951        $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        ); 
    5076    } 
    5177