Changeset 1746

Show
Ignore:
Timestamp:
07/28/08 22:29:45 (4 months ago)
Author:
mikey
Message:

add net::stubbles::php::serializer::stubExceptionReference::setReferencedExceptionName() and net::stubbles::php::serializer::stubExceptionReference::getReferencedExceptionName()

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • framework/trunk/src/main/php/net/stubbles/php/serializer/stubExceptionReference.php

    r1224 r1746  
    1717{ 
    1818    /** 
     19     * name of referenced exception 
     20     * 
     21     * @var  string 
     22     */ 
     23    protected $exceptionName; 
     24    /** 
    1925     * the stack trace of the referenced exception 
    2026     * 
     
    2228     */ 
    2329    protected $stackTrace = array(); 
     30 
     31    /** 
     32     * sets the name of the referenced exception 
     33     * 
     34     * @param  string  $exceptionName 
     35     */ 
     36    public function setReferencedExceptionName($exceptionName) 
     37    { 
     38        $this->exceptionName = $exceptionName; 
     39    } 
     40 
     41    /** 
     42     * returns the name of the referenced exception 
     43     * 
     44     * @return  string 
     45     */ 
     46    public function getReferencedExceptionName() 
     47    { 
     48        return $this->exceptionName; 
     49    } 
    2450 
    2551    /** 
  • framework/trunk/src/test/php/net/stubbles/php/serializer/stubExceptionReferenceTestCase.php

    r1703 r1746  
    3434 
    3535    /** 
     36     * assure that exceptionName property can be get and set 
     37     * 
     38     * @test 
     39     */ 
     40    public function exceptionNameProperty() 
     41    { 
     42        $this->assertNull($this->exceptionReference->getReferencedExceptionName()); 
     43        $this->exceptionReference->setReferencedExceptionName('foo::bar::BazException'); 
     44        $this->assertEquals('foo::bar::BazException', $this->exceptionReference->getReferencedExceptionName()); 
     45    } 
     46    /** 
    3647     * assure that stack trace property can be get and set 
    3748     *