diff --git a/library/Class/TypeDoc.php b/library/Class/TypeDoc.php index 62c024384e159bf30d74c6c87810e659e3775efa..8b4cdd96979cf87fa74a2f24bf106eab6500012b 100644 --- a/library/Class/TypeDoc.php +++ b/library/Class/TypeDoc.php @@ -168,6 +168,7 @@ class Class_TypeDoc extends Storm_Model_Abstract { const PERIODIQUE = 2; const DISQUE = 3; const DVD = 4; + const LOGICIEL = 5; const ARTICLE = 8; const RSS = 9; const SITE = 10; @@ -187,6 +188,7 @@ class Class_TypeDoc extends Storm_Model_Abstract { self::PERIODIQUE => 'Périodiques', self::DISQUE => 'Disques', self::DVD => 'DVD', + self::LOGICIEL => 'Logiciel', self::ARTICLE => 'Articles', self::RSS => 'Flux RSS', self::SITE => 'Sites', diff --git a/tests/application/modules/opac/controllers/AuthControllerTest.php b/tests/application/modules/opac/controllers/AuthControllerTest.php index 3d77e7c9fe7b88b2486b1b670ac666070edc7e0a..c0390d080738d0c6e96a24e455a69fee061ba435 100644 --- a/tests/application/modules/opac/controllers/AuthControllerTest.php +++ b/tests/application/modules/opac/controllers/AuthControllerTest.php @@ -295,13 +295,14 @@ class AuthControllerNobodyLoggedAndRegistrationAllowedAjaxLoginTest extends Auth class AuthControllerNobodyLoggedAndNoRegistrationTest extends AuthControllerNobodyLoggedTestCase { public function setUp() { + parent::setUp(); $interdire_enregistrement = new Class_AdminVar(); $interdire_enregistrement ->setId('INTERDIRE_ENREG_UTIL') ->setValeur(1); Class_AdminVar::getLoader()->cacheInstance($interdire_enregistrement); - parent::setUp(); + $this->dispatch('/opac/'); } diff --git a/tests/library/Class/CatalogueTest.php b/tests/library/Class/CatalogueTest.php index e0298cf399466f67539979d636c191fcb66dda6f..fea08ddafd448b86b6441faeae45c0fe2ba8a639 100644 --- a/tests/library/Class/CatalogueTest.php +++ b/tests/library/Class/CatalogueTest.php @@ -838,13 +838,18 @@ class CatalogueBuildCriteresRechercheTest extends Storm_Test_ModelTestCase { class CatalogueAddOrCreateTest extends CatalogueParentTest { public function setUp() { parent::setUp(); - + $this->mock_sql = Storm_Test_ObjectWrapper::mock(); + Zend_Registry::set('sql', $this->mock_sql); + + Storm_Test_ObjectWrapper::onLoaderOfModel('Class_CodifThesaurus') ->whenCalled('save') ->answers(true) ->whenCalled('findNextRacineCatalogue') ->answers('YYYY0001'); - + $this->mock_sql + ->whenCalled('query') + ->answers(null); } /** @test */ @@ -917,13 +922,14 @@ class CatalogueAddOrCreateTest extends CatalogueParentTest { ->answers('YYYYHIST003') ->whenCalled('deleteAllWithIdOrigineAndCode') ->answers(null) + ->whenCalled('findThesaurusForCatalogue') ->with(300) ->answers(Class_CodifThesaurus::newInstanceWithId(100)->setIdThesaurus('YYYYHIST0003')) ->whenCalled('findThesaurusForCatalogue') ->with(200) ->answers(Class_CodifThesaurus::newInstanceWithId(200)->setIdThesaurus('YYYYHIST0002')); - + $this->_politique->setParentId($this->_moyenage->getId()); $this->assertEquals('YYYYHIST00030001',$this->_politique->saveThesaurus()->getIdThesaurus()); }