Open theomega opened 11 years ago
That would be really great.
For testing during spout development, I usually just run workbench.php
file in my selfoss
directory. It contains something like the following (for selfoss 2.19):
<?php
require __DIR__ . '/src/common.php';
use Monolog\Handler\StreamHandler;
$log->popHandler();
$handler = new StreamHandler('php://stderr');
$log->pushHandler($handler);
$spout = $dice->create(spouts\rss\feed::class);
$params = [
'url' => 'https://web.developpez.com/index/rss',
];
$spout->load($params);
foreach ($spout->getItems() as $item) {
$content = $item->getContent();
var_dump($content);
die;
}
I'm missing a simple way of testing Spouts. I always have to run update.php, check the output and modify my php-files in a loop. Especially the caching of the results makes testing nearly impossible.
I think a simple page, where I can provide the spout-class as parameter would be nice. It should not save anything to the database but instead only show the output which would be saved. Even better would be the possibility to run the php-files containing the sprouts.
If such an interface existed, I would have written multiple sprouts I think.