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

STABLE fix error du to old fixture

parent c7cb22e7
Branches
Tags
3 merge requests!715Master,!664report fix from stable to wip,!663Stable
......@@ -16,7 +16,7 @@
*
* 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
*/
include_once('KohaFixtures.php');
......@@ -58,8 +58,10 @@ abstract class KohaTestCase extends PHPUnit_Framework_TestCase {
protected $service;
public function setUp() {
//Pour avoir les textes de prets par defaut
Class_Profil::getCurrentProfil()->setCfgNotice(array('exemplaires' => array()));
Class_Profil::setCurrentProfil($this->fixture('Class_Profil',
['id' => 1,
'libelle' => 'Actu']));
Class_AdminVar::newInstanceWithId('KOHA_MULTI_SITES', ['valeur' => '' ]);
$this->mock_web_client = $this->getMock('Class_WebService_SimpleWebClient');
......@@ -371,18 +373,18 @@ class KohaGetEmprunteurLaureAfondTest extends KohaTestCase {
}
/**
* @test
/**
* @test
* @depends firstReservationShouldExists
*/
public function reservationTitleShouldBeHarryPotter($hold) {
$this->assertEquals("Harry Potter et la chambre des secrets",
$this->assertEquals("Harry Potter et la chambre des secrets",
$hold->getTitre());
}
/**
* @test
/**
* @test
* @depends firstReservationShouldExists
*/
public function reservationAuteurShouldBeJKRowling($hold) {
......@@ -403,7 +405,7 @@ class KohaGetEmprunteurLaureAfondTest extends KohaTestCase {
/** @test */
public function firstReservationPickupLocationLabelShouldBeBiblioMeuse() {
$this->assertEquals('Biblio Meuse',
$this->assertEquals('Biblio Meuse',
$this->laurent->getReservationAt(0)->getPickupLocationLabel());
}
......@@ -440,14 +442,14 @@ class KohaGetEmprunteurLaureAfondTest extends KohaTestCase {
/** @test */
public function secondReservationPickupLocationLabelShouldBeMontmedy() {
$this->assertEquals('Montmedy',
$this->assertEquals('Montmedy',
$this->laurent->getReservationAt(1)->getPickupLocationLabel());
}
/** @test */
public function secondReservationGetEtatShouldBeEnAttente() {
$this->assertEquals('En attente',
$this->assertEquals('En attente',
$this->laurent->getReservationAt(1)->getEtat());
}
......@@ -466,7 +468,7 @@ class KohaGetEmprunteurLaureAfondTest extends KohaTestCase {
/** @test */
function thirdReservationEtatShouldBeExemplaireMisDeCote() {
$this->assertEquals('Exemplaire mis de côté',
$this->assertEquals('Exemplaire mis de côté',
$this->laurent->getReservationAt(2)->getEtat());
}
}
......@@ -492,7 +494,7 @@ class KohaGetEmprunteurJeanAndreWithIdSIGBTest extends KohaTestCase {
->will($this->returnValue(KohaFixtures::xmlGetPatronInfoJeanAndre()));
$this->jean = $this->service->getEmprunteur(
$this->fixture('Class_Users', ['id' => 43,
$this->fixture('Class_Users', ['id' => 43,
'login' => 'JEAN',
'password' => 'zork',
'id_sigb' => '01234']));
......@@ -532,7 +534,7 @@ class KohaGetEmprunteurJeanAndreWithIdSIGBTest extends KohaTestCase {
/** @test */
public function firstEmpruntTitreShouldBeLaGuitareEn10Lecons() {
$this->assertEquals('La guitare en 10 leçons',
$this->assertEquals('La guitare en 10 leçons',
$this->jean->getEmpruntAt(0)->getTitre());
}
......@@ -551,7 +553,7 @@ class KohaGetEmprunteurJeanAndreWithIdSIGBTest extends KohaTestCase {
/** @test */
public function firstEmpruntLibraryShouldBeTestingBranch() {
$this->assertEquals('Testing branch',
$this->assertEquals('Testing branch',
$this->jean->getEmpruntAt(0)->getBibliotheque());
}
......@@ -576,7 +578,7 @@ class KohaGetEmprunteurJeanAndreWithIdSIGBTest extends KohaTestCase {
/** @test */
public function secondEmpruntAuteurShouldBeRobertLouisStevenson() {
$this->assertEquals('Robert Louis Stevenson',
$this->assertEquals('Robert Louis Stevenson',
$this->jean->getEmpruntAt(1)->getAuteur());
}
......
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