$this->getPackage()->_getSimpleDirTag($this->getPackage()->_struc);
$this->_tasks->annotate($this->getPackage(), $taskfiles);
-
+ // Workaround for [#9364] Components notices and fatal error
+ if ($this->getPackage()->_packageInfo['changelog'] == '') {
+ unset($this->getPackage()->_packageInfo['changelog']);
+ }
$this->_filelist_factory->create($this->getPackage())->update();
}
}
\ No newline at end of file
->and('the new package.xml of the Horde component will contain the file', 'test2');
}
+ /**
+ * @scenario
+ */
+ public function testEmptyChangelog()
+ {
+ $this->given('the default Components setup')
+ ->when('calling the package with the packagexml option and a component with empty changelog')
+ ->then('the new package.xml of the Horde component will have a changelog entry');
+ }
+
/**
* @todo Test (and fix) the reactions to three more scenarios:
);
$world['output'] = $this->_callUnstrictComponents();
break;
+ case 'calling the package with the packagexml option and a component with empty changelog':
+ $_SERVER['argv'] = array(
+ 'horde-components',
+ '--pearrc=' . $this->_getTemporaryDirectory() . DIRECTORY_SEPARATOR . '.pearrc',
+ '--packagexml',
+ dirname(__FILE__) . '/fixture/changelog'
+ );
+ $world['output'] = $this->_callUnstrictComponents();
+ break;
case 'calling the package with the packagexml option and the path':
$_SERVER['argv'] = array(
'horde-components',
file_exists($this->_temp_dir . DIRECTORY_SEPARATOR . 'package.xml')
);
break;
+ case 'the new package.xml of the Horde component will have a changelog entry':
+ $this->assertRegExp(
+ '#</changelog>#',
+ $world['output']
+ );
+ break;
case 'a new PEAR configuration file will be installed':
$this->assertTrue(
file_exists($this->_temp_dir . DIRECTORY_SEPARATOR . '.pearrc')
--- /dev/null
+<?php
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<package packagerversion="1.9.0" version="2.0" xmlns="http://pear.php.net/dtd/package-2.0" xmlns:tasks="http://pear.php.net/dtd/tasks-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://pear.php.net/dtd/tasks-1.0 http://pear.php.net/dtd/tasks-1.0.xsd http://pear.php.net/dtd/package-2.0 http://pear.php.net/dtd/package-2.0.xsd">
+ <name>Fixture</name>
+ <channel>pear.php.net</channel>
+ <summary>Test fixture.</summary>
+ <description>A dummy package.xml used for testing the Components package.</description>
+ <lead>
+ <name>Gunnar Wrobel</name>
+ <user>wrobel</user>
+ <email>p@rdus.de</email>
+ <active>yes</active>
+ </lead>
+ <date>2010-08-22</date>
+ <time>21:12:03</time>
+ <version>
+ <release>0.0.1</release>
+ <api>0.0.1</api>
+ </version>
+ <stability>
+ <release>alpha</release>
+ <api>alpha</api>
+ </stability>
+ <license uri="http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html">LGPL</license>
+ <notes>
+* Initial release
+ </notes>
+ <contents>
+ <dir baseinstalldir="/" name="/">
+ <dir name="lib">
+ <file name="Some.php" role="php" />
+ </dir> <!-- /lib -->
+ </dir> <!-- / -->
+ </contents>
+ <dependencies>
+ <required>
+ <php>
+ <min>5.0.0</min>
+ </php>
+ <pearinstaller>
+ <min>1.7.0</min>
+ </pearinstaller>
+ </required>
+ </dependencies>
+ <phprelease>
+ <filelist>
+ <install as="Some.php" name="lib/Some.php" />
+ </filelist>
+ </phprelease>
+ <changelog/>
+</package>