mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-11 12:03:14 +00:00
Fix unit tests
This commit is contained in:
@@ -495,7 +495,9 @@ class Collection implements ControllerProviderInterface
|
|||||||
$collection->empty_collection(500);
|
$collection->empty_collection(500);
|
||||||
$msg = _('Collection empty successful');
|
$msg = _('Collection empty successful');
|
||||||
} else {
|
} else {
|
||||||
$settings = '<?xml version="1.0" encoding="UTF-8"?><tasksettings><bas_id>' . $collection->get_base_id() . '</bas_id></tasksettings>';
|
$settings = \task_period_emptyColl::getDefaultSettings($app['phraseanet.configuration'], array(
|
||||||
|
'bas_id' => $collection->get_base_id()
|
||||||
|
));
|
||||||
\task_period_emptyColl::create($app, $settings);
|
\task_period_emptyColl::create($app, $settings);
|
||||||
$msg = _('A task has been creted, please run it to complete empty collection');
|
$msg = _('A task has been creted, please run it to complete empty collection');
|
||||||
}
|
}
|
||||||
|
@@ -9,6 +9,8 @@
|
|||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
use Alchemy\Phrasea\Core\Configuration\Configuration;
|
||||||
|
|
||||||
class task_period_emptyColl extends task_appboxAbstract
|
class task_period_emptyColl extends task_appboxAbstract
|
||||||
{
|
{
|
||||||
protected $base_id;
|
protected $base_id;
|
||||||
@@ -36,7 +38,7 @@ class task_period_emptyColl extends task_appboxAbstract
|
|||||||
*/
|
*/
|
||||||
public static function getDefaultSettings(Configuration $config, array $params = array())
|
public static function getDefaultSettings(Configuration $config, array $params = array())
|
||||||
{
|
{
|
||||||
return "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<tasksettings>\n</tasksettings>";
|
return '<?xml version="1.0" encoding="UTF-8"?><tasksettings><bas_id>' . (isset($params['bas_id']) ? $params['bas_id'] : '' ) . '</bas_id></tasksettings>';
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function loadSettings(SimpleXMLElement $sx_task_settings)
|
protected function loadSettings(SimpleXMLElement $sx_task_settings)
|
||||||
|
Reference in New Issue
Block a user