function testJoinPath() { $path1 = "/Blah/Bloo/Bleh///"; $path2 = "foo/bar"; $path3 = "bar//of/foos/"; $this->assertEqual(Scaffold_Utils::join_path($path1, $path2, $path3), '/Blah/Bloo/Bleh/foo/bar/bar/of/foos/'); }
* Various options can be set in the URL. Scaffold * itself doesn't use these, but they are handy hooks * for modules to activate functionality if they are * present. */ $options = isset($_GET['options']) ? array_flip(explode(',', $_GET['options'])) : array(); /** * Whether to output the CSS, or return the result of Scaffold */ $display = true; /** * Set a base directory */ if (isset($_GET['d'])) { foreach ($files as $key => $file) { $files[$key] = Scaffold_Utils::join_path($_GET['d'], $file); } } /** * Parse and join an array of files */ $result = Scaffold::parse($files, $config, $options, $display); if ($display === false) { stop($result); } } /** * Prints out the value and exits. * * @author Anthony Short * @param $var