mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-23 18:03:17 +00:00
Add fixtures to sqlite db
This commit is contained in:
@@ -38,8 +38,7 @@ class Sha256Test extends \PhraseanetTestCase
|
||||
*/
|
||||
public function testCheck()
|
||||
{
|
||||
$session = new \Alchemy\Phrasea\Model\Entities\LazaretSession();
|
||||
self::$DI['app']['EM']->persist($session);
|
||||
$session = self::$DI['app']['EM']->find('Alchemy\Phrasea\Model\Entities\LazaretSession', 1);
|
||||
|
||||
self::$DI['app']['border-manager']->process($session, File::buildFromPathfile($this->media->getFile()->getPathname(), self::$DI['collection'], self::$DI['app']), null, Manager::FORCE_RECORD);
|
||||
|
||||
@@ -48,13 +47,11 @@ class Sha256Test extends \PhraseanetTestCase
|
||||
$mock
|
||||
->expects($this->once())
|
||||
->method('getSha256')
|
||||
->will($this->returnValue($this->media->getHash('sha256', __DIR__ . '/../../../../../files/test001.jpg')))
|
||||
->will($this->returnValue('7fad283de349b903c850548cda65cf2d86d24c4e3856cdc2b97e47430494b8c8'))
|
||||
;
|
||||
|
||||
$response = $this->object->check(self::$DI['app']['EM'], $mock);
|
||||
|
||||
$this->assertInstanceOf('\\Alchemy\\Phrasea\\Border\\Checker\\Response', $response);
|
||||
|
||||
$this->assertFalse($response->isOk());
|
||||
}
|
||||
|
||||
|
@@ -54,9 +54,7 @@ class ManagerTest extends \PhraseanetAuthenticatedWebTestCase
|
||||
{
|
||||
parent::setUp();
|
||||
$this->object = new Manager(self::$DI['app']);
|
||||
$this->session = new \Alchemy\Phrasea\Model\Entities\LazaretSession();
|
||||
|
||||
self::$DI['app']['EM']->persist($this->session);
|
||||
$this->session = self::$DI['app']['EM']->find('Alchemy\Phrasea\Model\Entities\LazaretSession', 1);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user