Example #1
0
 /**
  * @dataProvider workflowNameProvider
  */
 public function testSaveWorkflow($workflowName)
 {
     static $schema = null;
     if ($schema === null) {
         $schema = dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'design' . DIRECTORY_SEPARATOR . 'schema.rng';
     }
     $setupMethod = 'setUp' . $workflowName;
     $this->{$setupMethod}();
     $this->workflow->reset();
     $this->xmlStorage->save($this->workflow);
     $expected = $this->readExpected($workflowName);
     $actual = $this->readActual($workflowName);
     $this->assertEquals($expected, $actual);
     $document = new DOMDocument();
     $document->loadXML($actual);
     $this->assertTrue($document->relaxngValidate($schema));
 }