Skip to content
Snippets Groups Projects
Commit 37b07175 authored by Henri-Damien LAURENT's avatar Henri-Damien LAURENT
Browse files

Merge branch 'hotline#191394_Koha_Connection' into 'master'

hotline#191394 : Koha: fix problem with user connection

See merge request !4884
parents 860c2b87 623a26d8
Branches
Tags
1 merge request!4884hotline#191394 : Koha: fix problem with user connection
Pipeline #28270 passed with stage
in 19 minutes and 56 seconds
- correctif #191394 : Koha : corrige un problème à la connexion quand une limite d'affichage du nombre du nombre de prêts par page est présente
\ No newline at end of file
......@@ -156,13 +156,13 @@ class Class_WebService_SIGB_Koha_Service extends Class_WebService_SIGB_AbstractR
public function setLoansPerPage($loans_per_page) {
$this->loans_per_page = $loans_per_page;
$this->loans_per_page = (int) $loans_per_page;
return $this;
}
public function getLoansPerPage() :int {
return $this->loans_per_page ?? 0;
return (int) $this->loans_per_page ?? 0;
}
......
......@@ -703,3 +703,26 @@ class KohaCommunityEditUserTest extends KohaCommunityTestCase {
$this->assertEquals([], $this->borrower->getErrors());
}
}
/* @see https://forge.afi-sa.net/issues/191394 */
class KohaCommunityLoansPerPageTest extends KohaCommunityTestCase {
public function setUp(){
parent::setUp();
$this->service->setLoansPerPage('50');
}
/** @test */
public function loansPerPageShouldBeInt() {
$this->assertEquals('integer', gettype($this->service->getLoansPerPage()));
}
/** @test */
public function loansPerPageServiceShouldBe50() {
$this->assertEquals(50, $this->service->getLoansPerPage());
}
}
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