diff --git a/library/Class/Notice/DoubleFinder.php b/library/Class/Notice/DoubleFinder.php index b1f661124ab7c0100511c4a5f553230412be63fd..70259d56c4507696d9ff33b61eea154f4785eef0 100644 --- a/library/Class/Notice/DoubleFinder.php +++ b/library/Class/Notice/DoubleFinder.php @@ -89,13 +89,13 @@ class Class_Notice_DoubleFinder { private function recordAttributes() { - if ($this->mode_doublon == Class_CosmoVar::DOUBLE_SEARCH_IDS) + if ($this->_double_mode == Class_CosmoVar::DOUBLE_SEARCH_IDS) return [['isbn', $this->_data->getisbn13()], ['isbn', $this->_data->getisbn10()], ['ean', $this->_data->getean()], ['id_commerciale', $this->_data->getid_commerciale()]]; - if ($this->mode_doublon == Class_CosmoVar::DOUBLE_SEARCH_ALPHA_KEY) + if ($this->_double_mode == Class_CosmoVar::DOUBLE_SEARCH_ALPHA_KEY) return [ ['clef_alpha', $this->_data->getclef_alpha()] ]; return []; diff --git a/tests/library/Class/Cosmogramme/Integration/PhaseNoticeOAITest.php b/tests/library/Class/Cosmogramme/Integration/PhaseNoticeOAITest.php index 0df232a11b0c64ca687181719df25b95abc97552..dfa58f05b3ad78ce58d630b8db9ab16b2d991599 100644 --- a/tests/library/Class/Cosmogramme/Integration/PhaseNoticeOAITest.php +++ b/tests/library/Class/Cosmogramme/Integration/PhaseNoticeOAITest.php @@ -37,17 +37,20 @@ abstract class PhaseNoticeOAITestCase extends PhaseNoticeTestCase { $xml = file_get_contents(__DIR__.'/oairesults.xml'); $xml_page2 = file_get_contents(__DIR__.'/oairesults_page2.xml'); - $webclient = Storm_Test_ObjectWrapper::mock(); - $webclient->whenCalled('open_url') - ->with('http://oai.sta/lavista?verb=ListRecords&metadataPrefix=marc21&set=SCD01') - ->answers($xml) - ->whenCalled('open_url') - ->with('http://oai.sta/lavista?verb=ListRecords&resumptionToken=SCD01%40000505001000000008marc21') - ->answers($xml_page2) - ->beStrict(); + $webclient = $this + ->mock() - Class_WebService_OAI::setDefaultHttpClient($webclient); + ->whenCalled('open_url') + ->with('http://oai.sta/lavista?verb=ListRecords&metadataPrefix=marc21&set=SCD01') + ->answers($xml) + ->whenCalled('open_url') + ->with('http://oai.sta/lavista?verb=ListRecords&resumptionToken=SCD01%40000505001000000008marc21') + ->answers($xml_page2) + + ->beStrict(); + + Class_WebService_OAI::setDefaultHttpClient($webclient); $this->fixture('Class_Notice', ['id' => 1,