diff --git a/.travis.yml b/.travis.yml index 9b09b48fcb..3cff09f7c9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,7 +5,7 @@ before_script: - curl -s http://getcomposer.org/installer | php - php composer.phar install - sudo apt-get update - - sudo apt-get install -y ffmpeg libavcodec-extra-53 openoffice.org-writer unoconv ghostscript gsfonts dcraw ufraw graphicsmagick libgraphicsmagick1-dev libfreetype6-dev libjpeg-dev libgif-dev libtiff-dev libdjvulibre-dev libwmf-dev libmagickcore-dev libmagickwand-dev libpng-dev gettext zlib1g-dev build-essential libfaac-dev libmp3lame0 libx264-dev libvpx-dev libtheora-dev libvorbis-dev gpac + - sudo apt-get install -y xpdf ffmpeg libavcodec-extra-53 openoffice.org-writer unoconv ghostscript gsfonts dcraw ufraw graphicsmagick libgraphicsmagick1-dev libfreetype6-dev libjpeg-dev libgif-dev libtiff-dev libdjvulibre-dev libwmf-dev libmagickcore-dev libmagickwand-dev libpng-dev gettext zlib1g-dev build-essential libfaac-dev libmp3lame0 libx264-dev libvpx-dev libtheora-dev libvorbis-dev gpac - mysql -e 'create database ab_test;create database db_test; create database ab_unitTests; create database db_unitTests;' - sudo mysql -e "GRANT ALL PRIVILEGES ON ab_unitTests.* TO 'phraseaUnitTests'@'localhost' IDENTIFIED BY 'iWvGxPE8' WITH GRANT OPTION" - sudo mysql -e "GRANT ALL PRIVILEGES ON db_unitTests.* TO 'phraseaUnitTests'@'localhost' IDENTIFIED BY 'iWvGxPE8' WITH GRANT OPTION" diff --git a/tests/Alchemy/Phrasea/Border/Attribute/MetaFieldTest.php b/tests/Alchemy/Phrasea/Border/Attribute/MetaFieldTest.php index 59538343cb..cceb43059b 100644 --- a/tests/Alchemy/Phrasea/Border/Attribute/MetaFieldTest.php +++ b/tests/Alchemy/Phrasea/Border/Attribute/MetaFieldTest.php @@ -11,6 +11,7 @@ class MetaFieldTest extends \PhraseanetPHPUnitAbstract */ protected $object; protected $before; + protected $beforeNotice; protected $databox_field; /** @@ -29,6 +30,7 @@ class MetaFieldTest extends \PhraseanetPHPUnitAbstract $this->object = new MetaField($this->databox_field, $this->value); $this->before = \PHPUnit_Framework_Error_Warning::$enabled; + $this->beforeNotice = \PHPUnit_Framework_Error_Notice::$enabled; } /** @@ -37,6 +39,7 @@ class MetaFieldTest extends \PhraseanetPHPUnitAbstract public function tearDown() { \PHPUnit_Framework_Error_Warning::$enabled = $this->before; + \PHPUnit_Framework_Error_Notice::$enabled = $this->beforeNotice; $this->object = null; } @@ -114,6 +117,7 @@ class MetaFieldTest extends \PhraseanetPHPUnitAbstract public function testLoadFromStringFailSerialize() { \PHPUnit_Framework_Error_Warning::$enabled = false; - MetaField::loadFromString(serialize(array('Elephant', 'sbas_id' => 2))); + \PHPUnit_Framework_Error_Notice::$enabled = false; + MetaField::loadFromString(serialize(array('Elephant', 'sbas_id' => self::$collection->get_sbas_id(), 'id' => 0))); } } diff --git a/tests/Alchemy/Phrasea/Border/Checker/Sha256Test.php b/tests/Alchemy/Phrasea/Border/Checker/Sha256Test.php index c63b41591e..4c212e169d 100644 --- a/tests/Alchemy/Phrasea/Border/Checker/Sha256Test.php +++ b/tests/Alchemy/Phrasea/Border/Checker/Sha256Test.php @@ -38,12 +38,17 @@ class Sha256Test extends \PhraseanetPHPUnitAbstract */ public function testCheck() { + $session = new \Entities\LazaretSession(); + self::$core['EM']->persist($session); + + self::$core['border-manager']->process($session, File::buildFromPathfile($this->media->getFile()->getPathname(), self::$collection), null, \Alchemy\Phrasea\Border\Manager::FORCE_RECORD); + $mock = $this->getMock('\\Alchemy\\Phrasea\\Border\\File', array('getSha256'), array($this->media, self::$collection)); $mock ->expects($this->once()) ->method('getSha256') - ->will($this->returnValue(hash_file('sha256', __DIR__ . '/../../../../testfiles/test001.CR2'))) + ->will($this->returnValue($this->media->getHash('sha256', __DIR__ . '/../../../../testfiles/test001.CR2'))) ; $response = $this->object->check(self::$core['EM'], $mock); diff --git a/tests/Alchemy/Phrasea/Controller/Prod/LazaretTest.php b/tests/Alchemy/Phrasea/Controller/Prod/LazaretTest.php index d6da1327c1..b6288eee42 100644 --- a/tests/Alchemy/Phrasea/Controller/Prod/LazaretTest.php +++ b/tests/Alchemy/Phrasea/Controller/Prod/LazaretTest.php @@ -36,6 +36,8 @@ class LazaretTest extends \PhraseanetWebTestCaseAuthenticatedAbstract */ public function testListElement() { + $this->markTestSkipped('Route is not yet written'); + $originalEm = $this->app['Core']['EM']; //mock one Entities\LazaretFile::getRecordsToSubstitute