diff --git a/lib/classes/module/console/systemClearCache.class.php b/lib/classes/module/console/systemClearCache.class.php index da3ef4ba08..ac84e08e4c 100644 --- a/lib/classes/module/console/systemClearCache.class.php +++ b/lib/classes/module/console/systemClearCache.class.php @@ -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(); } diff --git a/tests/Alchemy/Phrasea/Controller/Admin/PublicationTest.php b/tests/Alchemy/Phrasea/Controller/Admin/PublicationTest.php index ffd32d6aa4..e39b04158a 100644 --- a/tests/Alchemy/Phrasea/Controller/Admin/PublicationTest.php +++ b/tests/Alchemy/Phrasea/Controller/Admin/PublicationTest.php @@ -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/" @@ -258,16 +261,17 @@ class Module_Admin_Route_PublicationTest extends PhraseanetWebTestCaseAuthentica $this->assertTrue($response->isOk()); $content = json_decode($response->getContent()); - + $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(); }