Пример #1
0
 public function testDirAccessors()
 {
     $url = new \r8\URL();
     $this->assertFalse($url->dirExists());
     $this->assertNull($url->getDir());
     $this->assertSame($url, $url->setDir("/dir/path"));
     $this->assertTrue($url->dirExists());
     $this->assertSame("/dir/path/", $url->getDir());
     $this->assertSame($url, $url->clearDir());
     $this->assertFalse($url->dirExists());
     $this->assertNull($url->getDir());
     $this->assertSame($url, $url->setDir("dir/path/"));
     $this->assertTrue($url->dirExists());
     $this->assertSame("/dir/path/", $url->getDir());
     $this->assertSame($url, $url->setDir("  "));
     $this->assertFalse($url->dirExists());
     $this->assertNull($url->getDir());
 }