Skip to content
Snippets Groups Projects

hotline #76992 improve refuse message in article workflow

Compare and Show latest version
9 files
+ 125
128
Preferences
Compare changes
Files
9
@@ -16,41 +16,41 @@
*
* You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
* along with BOKEH; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
require_once 'AdminAbstractControllerTestCase.php';
abstract class HarvestControllerToutApprendreTestCase extends Admin_AbstractControllerTestCase {
protected $_web_client;
abstract class HarvestControllerToutApprendreTestCase
extends Admin_AbstractControllerTestCase {
protected
$_storm_default_to_volatile = true,
$_web_client;
public function setUp() {
parent::setUp();
$this->_web_client = Storm_Test_ObjectWrapper::mock()
->whenCalled('open_url')->answers('');
Class_WebService_BibNumerique_ToutApprendre::setDefaultHttpClient($this->_web_client);
Class_WebService_BibNumerique_Vignette::setInstance(Storm_Test_ObjectWrapper::mock()
->whenCalled('updateAlbum')
->answers(true));
$this->_web_client = $this->mock()
->whenCalled('open_url')->answers('');
Class_AlbumCategorie::beVolatile();
Class_Album::beVolatile();
Class_WebService_BibNumerique_ToutApprendre::setDefaultHttpClient($this->_web_client);
Class_WebService_BibNumerique_RessourceNumerique::setCommand($this->mock()
->whenCalled('execTimedScript')
->answers(''));
$this->onLoaderOfModel('Class_AlbumRessource')
->whenCalled('getNextOrderFor')
->answers(1)
->whenCalled('delete')
->answers(true)
->whenCalled('save')
->answers(true);
}
}
Storm_Test_ObjectWrapper::onLoaderOfModel('Class_AlbumRessource')
->whenCalled('getNextOrderFor')
->answers(1)
->whenCalled('delete')
->answers(true)
->whenCalled('save')
->answers(true);
}
}
abstract class HarvestControllerToutApprendreNotActivatedTestCase extends HarvestControllerToutApprendreTestCase {
public function setUp() {
parent::setUp();
@@ -105,7 +105,7 @@ class HarvestControllerToutApprendreActivatedWithErrorTest extends HarvestContro
->with('')
->answers('');
$this->dispatch('/admin/harvest/toutapprendre', true);
$this->dispatch('/admin/harvest/toutapprendre', true);
}
@@ -125,7 +125,7 @@ class HarvestControllerToutApprendreActivatedWithErrorTest extends HarvestContro
class HarvestControllerToutApprendreActivatedWithCoursTest extends HarvestControllerToutApprendreWithCoursTestCase {
protected
protected
$_albumWrapper;
public function setUp() {
@@ -135,7 +135,7 @@ class HarvestControllerToutApprendreActivatedWithCoursTest extends HarvestContro
->whenCalled('deleteBy')
->answers(null);
$this->dispatch('/admin/harvest/toutapprendre', true);
$this->dispatch('/admin/harvest/toutapprendre', true);
}
@@ -166,7 +166,7 @@ class HarvestControllerToutApprendreActivatedWithCoursTest extends HarvestContro
class HarvestControllerToutApprendreBrowse extends HarvestControllerToutApprendreWithCoursTestCase {
public function setUp() {
parent::setUp();
$this->dispatch('/admin/harvest/toutapprendre-browse', true);
$this->dispatch('/admin/harvest/toutapprendre-browse', true);
}
@@ -224,4 +224,3 @@ EOXML;
}
}