Show
Ignore:
Timestamp:
02/22/10 18:08:48 (7 months ago)
Author:
mikey
Message:

fix problems with dots and spaces in url param names

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • framework/trunk/src/test/php/net/stubbles/peer/stubURLTestCase.php

    r2425 r2502  
    403403 
    404404    /** 
     405     * @test 
     406     */ 
     407    public function paramsWithDots() 
     408    { 
     409        $url = stubURL::fromString('http://example.org/?foo.bar=baz.baz'); 
     410        $this->assertTrue($url->hasQuery()); 
     411        $this->assertEquals('http://example.org/?foo.bar=baz.baz', $url->get()); 
     412        $this->assertEquals('http://example.org/?foo.bar=baz.baz', $url->get(true)); 
     413        $this->assertEquals('http://example.org/?foo.bar=baz.baz', $url->get(true, false)); 
     414        $this->assertSame($url, $url->addParam('bar.baz', 'foo.foo')); 
     415        $this->assertEquals('http://example.org/?foo.bar=baz.baz&bar.baz=foo.foo', $url->get()); 
     416        $this->assertEquals('http://example.org/?foo.bar=baz.baz&bar.baz=foo.foo', $url->get(true)); 
     417        $this->assertEquals('http://example.org/?foo.bar=baz.baz&bar.baz=foo.foo', $url->get(true, false)); 
     418    } 
     419 
     420    /** 
    405421     * assure that wrong parameters throw an exception 
    406422     *