コード例 #1
0
ファイル: URL.php プロジェクト: Nycto/Round-Eights
 public function testUserNameAccessors()
 {
     $url = new \r8\URL();
     $this->assertFalse($url->userNameExists());
     $this->assertNull($url->getUserName());
     $this->assertSame($url, $url->setUserName("uname"));
     $this->assertTrue($url->userNameExists());
     $this->assertSame("uname", $url->getUserName());
     $this->assertSame($url, $url->clearUserName());
     $this->assertFalse($url->userNameExists());
     $this->assertNull($url->getUserName());
     $this->assertSame($url, $url->setUserName("uname"));
     $this->assertTrue($url->userNameExists());
     $this->assertSame("uname", $url->getUserName());
     $this->assertSame($url, $url->setUserName("  "));
     $this->assertFalse($url->userNameExists());
     $this->assertNull($url->getUserName());
 }