Skip to content

Commit

Permalink
Merge pull request #109 from MageTest/feature/improve-config-generator
Browse files Browse the repository at this point in the history
Config generator improvements
  • Loading branch information
James Cowie committed Jul 3, 2015
2 parents 3ca3d0e + 21ce8c4 commit 701b3b1
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ private function getDirectoryPath($moduleName)

private function getCurrentConfigXml($moduleName)
{
if (!$this->moduleFileExists($moduleName)) {
if (!$this->moduleFileExists()) {
$values = array(
'%module_name%' => $moduleName
);
Expand All @@ -101,7 +101,13 @@ private function moduleFileExists()

private function getIndentedXml(\SimpleXMLElement $xml)
{
return $this->formatter->format($xml->asXML());
$xmlText = $xml->asXML();

if (false === $xmlText) {
throw new \RuntimeException('Failed to convert XML object to string');
}

return $this->formatter->format($xmlText);
}

/**
Expand Down

0 comments on commit 701b3b1

Please sign in to comment.