This commit is contained in:
Nicolas Le Goff
2012-06-01 11:24:11 +02:00
parent 49900878c8
commit c3eb3f022f
2 changed files with 14 additions and 10 deletions

View File

@@ -58,7 +58,7 @@ class module_console_systemClearCache extends Command
$filesystem->remove($finder);
if (\setup::is_installed()) {
if (setup::is_installed()) {
$Core = \bootstrap::getCore();
$Core['CacheService']->flushAll();
}

View File

@@ -233,19 +233,22 @@ class Module_Admin_Route_PublicationTest extends PhraseanetWebTestCaseAuthentica
public function testIconUpload()
{
$appbox = appbox::get_instance(\bootstrap::getCore());
$core = \bootstrap::getCore();
$appbox = appbox::get_instance($core);
$feed = Feed_Adapter::create($appbox, self::$user, "salut", 'coucou');
$files = array(
'files' => array(
new \Symfony\Component\HttpFoundation\File\UploadedFile(
__DIR__ . '/../../../../testfiles/logocoll1.gif', 'logocoll1.gif'
__DIR__ . '/../../../../testfiles/logocoll.gif', 'logocoll.gif'
)
)
);
copy(__DIR__ . '/../../../../testfiles/logocoll.gif', __DIR__ . '/../../../../testfiles/logocoll1.gif');
// $core['file-system']->copy(__DIR__ . '/../../../../testfiles/logocoll.gif', __DIR__ . '/../../../../testfiles/logocoll1.gif');
$this->client->request(
"POST"
, "/publications/feed/" . $feed->get_id() . "/iconupload/"
@@ -262,12 +265,13 @@ class Module_Admin_Route_PublicationTest extends PhraseanetWebTestCaseAuthentica
$this->assertTrue($content->success);
$feed = new Feed_Adapter($appbox, $feed->get_id());
try {
$file = new SplFileObject(__DIR__ . '/../../../../testfiles/logocoll1.gif');
$this->fail('logo not deleted');
} catch (\Exception $e) {
}
// try {
// $file = new SplFileObject(__DIR__ . '/../../../../testfiles/logocoll1.gif');
// $this->fail('logo not deleted');
// } catch (\Exception $e) {
//
// }
$feed->delete();
}