Ejemplo n.º 1
0
 public function testGetSetBasePath()
 {
     $helper = new AssetsHelper();
     $helper->setBasePath('foo/');
     $this->assertEquals('/foo/', $helper->getBasePath(), '->setBasePath() prepends a / if needed');
     $helper->setBasePath('/foo');
     $this->assertEquals('/foo/', $helper->getBasePath(), '->setBasePath() appends a / is needed');
     $helper->setBasePath('');
     $this->assertEquals('/', $helper->getBasePath(), '->setBasePath() returns / if no base path is defined');
     $helper->setBasePath('0');
     $this->assertEquals('/0/', $helper->getBasePath(), '->setBasePath() returns /0/ if 0 is given');
 }