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); $filesystem->remove($finder);
if (\setup::is_installed()) { if (setup::is_installed()) {
$Core = \bootstrap::getCore(); $Core = \bootstrap::getCore();
$Core['CacheService']->flushAll(); $Core['CacheService']->flushAll();
} }

View File

@@ -233,19 +233,22 @@ class Module_Admin_Route_PublicationTest extends PhraseanetWebTestCaseAuthentica
public function testIconUpload() 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'); $feed = Feed_Adapter::create($appbox, self::$user, "salut", 'coucou');
$files = array( $files = array(
'files' => array( 'files' => array(
new \Symfony\Component\HttpFoundation\File\UploadedFile( 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( $this->client->request(
"POST" "POST"
, "/publications/feed/" . $feed->get_id() . "/iconupload/" , "/publications/feed/" . $feed->get_id() . "/iconupload/"
@@ -258,16 +261,17 @@ class Module_Admin_Route_PublicationTest extends PhraseanetWebTestCaseAuthentica
$this->assertTrue($response->isOk()); $this->assertTrue($response->isOk());
$content = json_decode($response->getContent()); $content = json_decode($response->getContent());
$this->assertTrue($content->success); $this->assertTrue($content->success);
$feed = new Feed_Adapter($appbox, $feed->get_id()); $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(); $feed->delete();
} }