Пример #1
0
 function testPath()
 {
     $good = array("/", "/hello", "/", "/hello-⢬");
     $bad = array("hello", "/hello/", "/hello-𐍈", "/hello-�", "/hello-�", "/hello-�", "/hello-��");
     foreach ($good as $path) {
         dbx\Path::checkArg('whatever', $path);
     }
     foreach ($bad as $path) {
         try {
             dbx\Path::checkArg('whatever', $path);
             assert(false, "Failed on " . $path);
         } catch (\InvalidArgumentException $ex) {
             // This is what we expect.
         }
     }
 }
Пример #2
0
 public function getMetadataWithChildren($path, $params = array("list" => "true", "file_limit" => "25000", "include_media_info" => "true"))
 {
     Path::checkArg("path", $path);
     return $this->_getMetadata($path, $params);
 }