diff --git a/VERSIONS_STABLE/hotline_#20607_orphee_integration b/VERSIONS_STABLE/hotline_#20607_orphee_integration new file mode 100644 index 0000000000000000000000000000000000000000..ff2fa96253f13c73c3152fe0d8611faf067da8ef --- /dev/null +++ b/VERSIONS_STABLE/hotline_#20607_orphee_integration @@ -0,0 +1 @@ + - ticket: #20607: Correction d'un bug dans cosmogramme qui stoppait l'intégration des nouveaux fichiers. \ No newline at end of file diff --git a/cosmogramme/php/classes/classe_notice_integration.php b/cosmogramme/php/classes/classe_notice_integration.php index 545dc191f338be6ed174bef2368cc2f5c995fcea..16d52290440b283878afbc9c3afc7867b1d47dc7 100644 --- a/cosmogramme/php/classes/classe_notice_integration.php +++ b/cosmogramme/php/classes/classe_notice_integration.php @@ -569,7 +569,7 @@ class notice_integration { } - private function updateNotice($id_notice, $qualite) { + public function updateNotice($id_notice, $qualite) { if(!$existing_notice = Class_Notice::find($id_notice)) return $id_notice; $this->notice["qualite"] = $existing_notice->getQualite(); @@ -685,7 +685,7 @@ class notice_integration { } - private function ecrireExemplaires($id_notice) { + public function ecrireExemplaires($id_notice) { $code_barres = []; $exemplaires = []; foreach ($this->notice['exemplaires'] as $ex) { diff --git a/cosmogramme/tests/php/classes/NoticeIntegrationTest.php b/cosmogramme/tests/php/classes/NoticeIntegrationTest.php index 8300e9a97ded194a3a4aba7173c2190b8a427e59..dce95e10e9601cf629e4911a5b51f6053d80d814 100644 --- a/cosmogramme/tests/php/classes/NoticeIntegrationTest.php +++ b/cosmogramme/tests/php/classes/NoticeIntegrationTest.php @@ -2309,4 +2309,30 @@ class NoticeIntegrationPommeDeReinetteTest extends NoticeIntegrationTestCase { } -?> \ No newline at end of file + + +class NoticeIntegrationNoNoticeTest extends NoticeIntegrationTestCase { + public function tearDown() { + Storm_Model_Loader::defaultToDb(); + parent::tearDown(); + } + + + public function setUp() { + parent::setUp(); + Storm_Model_Loader::defaultToVolatile(); + $this->_notice_integration = new notice_integration(); + } + + + /** @test */ + public function updateNoticeShouldNotCrash() { + $this->assertEquals(1, $this->_notice_integration->updateNotice(1,5)); + } + + + /** @test */ + public function writeItemShouldNotCrash() { + $this->assertNull($this->_notice_integration->ecrireExemplaires(1)); + } +} \ No newline at end of file