public function testDir() { $h = new Url($this->container); $this->assertEquals('', $h->dir()); $_SERVER['REQUEST_METHOD'] = 'GET'; $_SERVER['PHP_SELF'] = '/plop/index.php'; $h = new Url($this->container); $this->assertEquals('/plop/', $h->dir()); $_SERVER['REQUEST_METHOD'] = 'GET'; $_SERVER['PHP_SELF'] = ''; $h = new Url($this->container); $this->assertEquals('/', $h->dir()); }