Changeset 719

Show
Ignore:
Timestamp:
06/09/07 12:21:40 (1 year ago)
Author:
mikey
Message:

added net.stubbles.util.net and net.stubbles.util.net.http
added net.stubbles.ipo.request.filters.stubHTTPURLFilter

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/main/resources/ipo/request.xml

    r337 r719  
    106106    <valueKeys /> 
    107107  </error> 
     108  <error id="URL_INCORRECT"> 
     109    <messages> 
     110      <message locale="en_EN">The URL is not a valid HTTP-URL.</message> 
     111      <message locale="de_DE">Der URL ist kein gültiger HTTP-URL.</message> 
     112    </messages> 
     113    <valueKeys /> 
     114  </error> 
     115  <error id="URL_NOT_AVAILABLE"> 
     116    <messages> 
     117      <message locale="en_EN">The URL is not available.</message> 
     118      <message locale="de_DE">Der URL ist nicht erreichbar.</message> 
     119    </messages> 
     120    <valueKeys /> 
     121  </error> 
    108122</xj:configuration> 
  • trunk/src/test/php/net/stubbles/integration/stubRequestValueErrorXJConfFactoryTestCase.php

    r446 r719  
    3030        $this->assertClone($requestError, $requestError2); 
    3131    } 
    32      
     32 
    3333    /** 
    3434     * test that the FIELD_NO_SELECT error is created 
     
    4545        $this->assertClone($requestError, $requestError2); 
    4646    } 
    47      
     47 
    4848    /** 
    4949     * test that the FIELD_WRONG_VALUE error is created 
     
    6060        $this->assertClone($requestError, $requestError2); 
    6161    } 
    62      
     62 
    6363    /** 
    6464     * test that the VALUE_TOO_SMALL error is created 
     
    7575        $this->assertClone($requestError, $requestError2); 
    7676    } 
    77      
     77 
    7878    /** 
    7979     * test that the VALUE_TOO_GREAT error is created 
     
    9090        $this->assertClone($requestError, $requestError2); 
    9191    } 
    92      
     92 
    9393    /** 
    9494     * test that the PASSWORDS_NOT_EQUAL error is created 
     
    105105        $this->assertClone($requestError, $requestError2); 
    106106    } 
    107      
     107 
    108108    /** 
    109109     * test that the PASSWORD_INVALID error is created 
     
    120120        $this->assertClone($requestError, $requestError2); 
    121121    } 
    122      
     122 
    123123    /** 
    124124     * test that the STRING_TOO_SHORT error is created 
     
    135135        $this->assertClone($requestError, $requestError2); 
    136136    } 
    137      
     137 
    138138    /** 
    139139     * test that the STRING_TOO_LONG error is created 
     
    150150        $this->assertClone($requestError, $requestError2); 
    151151    } 
    152      
     152 
    153153    /** 
    154154     * test that the DATE_INVALID error is created 
     
    165165        $this->assertClone($requestError, $requestError2); 
    166166    } 
    167      
     167 
    168168    /** 
    169169     * test that the DATE_TOO_EARLY error is created 
     
    180180        $this->assertClone($requestError, $requestError2); 
    181181    } 
    182      
     182 
    183183    /** 
    184184     * test that the DATE_TOO_LATE error is created 
     
    195195        $this->assertClone($requestError, $requestError2); 
    196196    } 
    197      
     197 
    198198    /** 
    199199     * test that the MAILADDRESS_INCORRECT error is created 
     
    208208        $this->assertTrue($requestError->hasMessage('de_DE')); 
    209209        $requestError2 = $rveFactory->create('MAILADDRESS_INCORRECT'); 
     210        $this->assertClone($requestError, $requestError2); 
     211    } 
     212 
     213    /** 
     214     * test that the URL_INCORRECT error is created 
     215     */ 
     216    public function testURL_INCORRECT() 
     217    { 
     218        $rveFactory = new stubRequestValueErrorXJConfFactory(); 
     219        $requestError = $rveFactory->create('URL_INCORRECT'); 
     220        $this->assertIsA($requestError, 'stubRequestValueError'); 
     221        $this->assertEqual($requestError->getId(), 'URL_INCORRECT'); 
     222        $this->assertTrue($requestError->hasMessage('en_EN')); 
     223        $this->assertTrue($requestError->hasMessage('de_DE')); 
     224        $requestError2 = $rveFactory->create('URL_INCORRECT'); 
     225        $this->assertClone($requestError, $requestError2); 
     226    } 
     227 
     228    /** 
     229     * test that the URL_NOT_AVAILABLE error is created 
     230     */ 
     231    public function testURL_NOT_AVAILABLE() 
     232    { 
     233        $rveFactory = new stubRequestValueErrorXJConfFactory(); 
     234        $requestError = $rveFactory->create('URL_NOT_AVAILABLE'); 
     235        $this->assertIsA($requestError, 'stubRequestValueError'); 
     236        $this->assertEqual($requestError->getId(), 'URL_NOT_AVAILABLE'); 
     237        $this->assertTrue($requestError->hasMessage('en_EN')); 
     238        $this->assertTrue($requestError->hasMessage('de_DE')); 
     239        $requestError2 = $rveFactory->create('URL_NOT_AVAILABLE'); 
    210240        $this->assertClone($requestError, $requestError2); 
    211241    } 
  • trunk/src/test/php/net/stubbles/ipo/IPOTestSuite.php

    r547 r719  
    2929         
    3030        $this->addTestFile($dir . '/request/filters/stubFloatFilterTestCase.php'); 
     31        $this->addTestFile($dir . '/request/filters/stubHTTPURLFilterTestCase.php'); 
    3132        $this->addTestFile($dir . '/request/filters/stubIntegerFilterTestCase.php'); 
    3233        $this->addTestFile($dir . '/request/filters/stubMailFilterTestCase.php'); 
  • trunk/src/test/php/net/stubbles/util/UtilTestSuite.php

    r695 r719  
    4646        $this->addTestFile($dir . '/log/stubLogDataFactoryTestCase.php'); 
    4747        $this->addTestFile($dir . '/log/stubLoggerXJConfFactoryTestCase.php'); 
     48         
     49        // net classes 
     50        $this->addTestFile($dir . '/net/stubHeaderListTestCase.php'); 
     51        $this->addTestFile($dir . '/net/stubSocketTestCase.php'); 
     52        $this->addTestFile($dir . '/net/stubURLTestCase.php'); 
     53         
     54        // net_http classes 
     55        $this->addTestFile($dir . '/net/http/stubHTTPURLTestCase.php'); 
    4856 
    4957        // now all the validators