Skip to content
Snippets Groups Projects
Commit b59adb8a authored by Ghislain Loas's avatar Ghislain Loas
Browse files

holtine #50082 fix reservationsTableTest

parent fb2adf18
Branches
Tags
5 merge requests!2080Sandbox detach zf from storm,!2061Master,!2009Master,!2008Hotline master,!2003Hotline#50082 mixed records links in loans list
......@@ -25,27 +25,58 @@ class ReservationsTableTest extends ViewHelperTestCase {
public function setUp() {
parent::setUp();
$potter_record = $this->fixture('Class_Notice',
['id' => 100])
->setTitrePrincipal('Harry Potter');
$marche_record = $this->fixture('Class_Notice',
['id' => 120]);
$harry_potter = new Class_WebService_SIGB_Reservation('10', new Class_WebService_SIGB_Exemplaire(100));
$harry_potter->getExemplaire()
->setTitre('Harry Potter')
->setNoticeOPAC(Class_Notice::newInstanceWithId(100));
->setCodeBarre(123456)
->setNoticeOPAC($potter_record);
$harry_potter->setEtat('Pas disponible');
$le_marche = new Class_WebService_SIGB_Reservation('12', new Class_WebService_SIGB_Exemplaire(120));
$le_marche->getExemplaire()
->setTitre('Le marché couvert')
->setNoticeOPAC(Class_Notice::newInstanceWithId(120));
->setCodeBarre(456789)
->setNoticeOPAC($marche_record);
$le_marche->setEtat('Disponible');
$emprunteur = new Class_WebService_SIGB_Emprunteur('1234', 'Estelle');
$emprunteur->reservationsAddAll([$harry_potter, $le_marche]);
$user = Class_Users::newInstanceWithId('123456',
['nom' => 'Estelle',
'role_level' => ZendAfi_Acl_AdminControllerRoles::ABONNE_SIGB])
->setFicheSigb(['fiche' => $emprunteur]);
$this->fixture('Class_Exemplaire',
['id' => 45,
'code_barres' => 123456,
'id_notice' => 100,
'id_int_bib' => 654]);
$this->fixture('Class_Exemplaire',
['id' => 89,
'code_barres' => 456789,
'id_notice' => 120,
'id_int_bib' => 654]);
$this->fixture('Class_IntBib',
['id' => 654,
'comm_sigb' => 666,
'comm_params' => ['url_serveur' => 'https://mon-sigb.even']]);
$user = $this->fixture('Class_Users',
['id' => 123456,
'nom' => 'Estelle',
'login' => 'stl',
'password' => 'pwd',
'idabon' => '888',
'role_level' => ZendAfi_Acl_AdminControllerRoles::ABONNE_SIGB,
'id_site' => 654,
'id_int_bib' => 654])
->setFicheSigb(['fiche' => $emprunteur]);
ZendAfi_Auth::getInstance()->logUser($user);
$helper = new ZendAfi_View_Helper_Abonne_ReservationsTable();
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment