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; }
function testLoadString() { $this->assertEquals($this->fixtureShouldBe, WFYaml::loadString(file_get_contents(dirname(__FILE__) . '/WFYamlTest.yaml'))); }