public function setBasePath($basePath) { if (null !== $basePath) { $basePath = trim($basePath, '/'); $basePath = $basePath . '/'; } $this->basePath = $basePath; }
public function testSetBasePath() { $url = '/~/jone/assets'; $expected = trim($url, '/') . '/'; $result = $this->object->setBasePath($url); $this->assertNull($result); $this->assertEquals($expected, $this->object->getBasePath()); }