コード例 #1
0
ファイル: TestCase.php プロジェクト: rickyrobinett/morph
 /**
  * Clear the specified collection and populates it with the $json
  *
  * $json should be a JSON encoded array of documents
  *
  * @param string $collectionName
  * @param string $json
  * @return boolean
  */
 public function loadJsonStringDatasetIntoCollection($collectionName, $json)
 {
     $collection = $this->getDatabase()->selectCollection($collectionName);
     $loader = new JsonLoader($collection);
     return $loader->loadJsonFromString($json);
 }