Exemplo n.º 1
0
 public function loadFromYaml($yamlString, $saveMethod = NULL)
 {
     // load the fixtures data & process
     $allCreatedObjects = $this->processObjectList(WFYaml::loadString($yamlString));
     if ($saveMethod) {
         foreach ($allCreatedObjects as $o) {
             try {
                 $o->{$saveMethod}();
             } catch (Exception $e) {
                 throw new WFException("Error saving object: " . $o . "\n" . $e->getMessage());
             }
         }
     }
     return $allCreatedObjects;
 }
Exemplo n.º 2
0
 function testLoadString()
 {
     $this->assertEquals($this->fixtureShouldBe, WFYaml::loadString(file_get_contents(dirname(__FILE__) . '/WFYamlTest.yaml')));
 }