diff --git a/tests/library/Class/Cosmogramme/Integration/RecordPhaseBibliondemandTest.php b/tests/library/Class/Cosmogramme/Integration/PhaseNoticeBibliondemandTest.php similarity index 95% rename from tests/library/Class/Cosmogramme/Integration/RecordPhaseBibliondemandTest.php rename to tests/library/Class/Cosmogramme/Integration/PhaseNoticeBibliondemandTest.php index ba351e6c95e264a8228411e7d91428e9215e8f70..af82ba170a6f6b330faa0a07068f45e175844a90 100644 --- a/tests/library/Class/Cosmogramme/Integration/RecordPhaseBibliondemandTest.php +++ b/tests/library/Class/Cosmogramme/Integration/PhaseNoticeBibliondemandTest.php @@ -22,7 +22,7 @@ require_once('cosmogramme/php/fonctions/variables.php'); require_once(__DIR__.'/PhaseNoticeTestCase.php'); -abstract class AbstractRecordPhaseBibliondemandTestCase extends PhaseNoticeTestCase { +abstract class PhaseNoticeBibliondemandTestCase extends PhaseNoticeTestCase { protected $_storm_default_to_volatile = true; protected function _prepareFixtures() { @@ -94,7 +94,7 @@ abstract class AbstractRecordPhaseBibliondemandTestCase extends PhaseNoticeTestC -class RecordPhaseBibliondemandSimpleTest extends AbstractRecordPhaseBibliondemandTestCase { +class PhaseNoticeBibliondemandSimpleTest extends PhaseNoticeBibliondemandTestCase { /** @test */ public function logShouldNotContainsError() { $this->assertNotLogContains('Erreur'); @@ -229,7 +229,7 @@ class RecordPhaseBibliondemandSimpleTest extends AbstractRecordPhaseBibliondeman -class RecordPhaseBibliondemandUpdateTest extends AbstractRecordPhaseBibliondemandTestCase { +class PhaseNoticeBibliondemandUpdateTest extends PhaseNoticeBibliondemandTestCase { public function _prepareFixtures() { parent::_prepareFixtures(); @@ -279,7 +279,7 @@ class RecordPhaseBibliondemandUpdateTest extends AbstractRecordPhaseBibliondeman -class RecordPhaseBibliondemandSimpleFileTest extends RecordPhaseBibliondemandSimpleTest { +class PhaseNoticeBibliondemandSimpleFileTest extends PhaseNoticeBibliondemandSimpleTest { protected function _prepareIntegration() { Class_Cosmogramme_Integration::find(888) @@ -291,7 +291,7 @@ class RecordPhaseBibliondemandSimpleFileTest extends RecordPhaseBibliondemandSim -class RecordPhaseBibliondemandUpdateFileTest extends RecordPhaseBibliondemandUpdateTest { +class PhaseNoticeBibliondemandUpdateFileTest extends PhaseNoticeBibliondemandUpdateTest { protected function _prepareIntegration() { Class_Cosmogramme_Integration::find(888) diff --git a/tests/library/Class/Cosmogramme/Integration/PhasePrepareIntegrationsTest.php b/tests/library/Class/Cosmogramme/Integration/PhasePrepareIntegrationsTest.php index fd524be7fbed5724ff46a383a323355cf6427d40..62a1a3a5d8e07165f5cd7f2d54ee4f7119126bfd 100644 --- a/tests/library/Class/Cosmogramme/Integration/PhasePrepareIntegrationsTest.php +++ b/tests/library/Class/Cosmogramme/Integration/PhasePrepareIntegrationsTest.php @@ -19,40 +19,41 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -abstract class PhasePrepareIntegrationsWithOAITestCase extends Class_Cosmogramme_Integration_PhaseTestCase { +abstract class PhasePrepareIntegrationsWithOAITestCase + extends Class_Cosmogramme_Integration_PhaseTestCase { + protected $_http_client; public function setUp() { parent::setUp(); - $file_system = Storm_Test_ObjectWrapper::mock(); - $file_system - ->whenCalled('is_file') - ->with ('ftp/my-library.net/transferts/foo/mylibrarytotal.txt') - ->answers(true) + $file_system = $this->mock() + ->whenCalled('is_file') + ->with ('ftp/my-library.net/transferts/foo/mylibrarytotal.txt') + ->answers(true) - ->whenCalled('is_file') - ->with ('ftp/my-library.net/transferts/foo/mylibraryincr.txt') - ->answers(false) + ->whenCalled('is_file') + ->with ('ftp/my-library.net/transferts/foo/mylibraryincr.txt') + ->answers(false) - ->whenCalled('opendir') - ->with ('ftp/my-library.net/transferts/foo/') - ->answers('dir_pointer') + ->whenCalled('opendir') + ->with ('ftp/my-library.net/transferts/foo/') + ->answers('dir_pointer') - ->whenCalled('readdir') - ->with ('dir_pointer') - ->answers('mylibraryincr.txt') + ->whenCalled('readdir') + ->with ('dir_pointer') + ->answers('mylibraryincr.txt') - ->whenCalled('closedir') - ->with ('dir_pointer') - ->answers(true) + ->whenCalled('closedir') + ->with ('dir_pointer') + ->answers(true) - ->whenCalled('rename') - ->with('ftp/my-library.net/transferts/foo/mylibrarytotal.txt', - 'ftp/my-library.net/integration/integre1179.pan') - ->answers(true) - ->beStrict(); + ->whenCalled('rename') + ->with('ftp/my-library.net/transferts/foo/mylibrarytotal.txt', + 'ftp/my-library.net/integration/integre1179.pan') + ->answers(true) + ->beStrict(); $this->_http_client = $this->mock() ->whenCalled('postData') @@ -73,6 +74,9 @@ abstract class PhasePrepareIntegrationsWithOAITestCase extends Class_Cosmogramme public function tearDown() { Class_Systeme_Report_Publication::resetHttpClient(); + Class_Cosmogramme_Integration_PhasePrepareIntegrations::setFileSystem(null); + Class_Cosmogramme_Integration_PhasePrepareIntegrations::setTimeSource(null); + parent::tearDown(); }