Skip to content
Snippets Groups Projects
Commit 2c63ad9c authored by Laurent's avatar Laurent
Browse files

hotline #16118 smartphone home page

fix failing tests
parent d5f767ab
Branches
Tags
2 merge requests!393Master,!392Hotline 6.51
......@@ -16,7 +16,7 @@
*
* You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
* along with AFI-OPAC 2.0; 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 'TelephoneAbstractControllerTestCase.php';
......@@ -34,7 +34,7 @@ abstract class AbonneControllerTelephoneTestCase extends TelephoneAbstractContro
->setBibliotheque('Annecy')
->setDateRetour('23/45/6789')
->setNoticeOPAC(Class_Notice::getLoader()->newInstanceWithId(45));
$alice = Class_WebService_SIGB_Emprunt::newInstanceWithEmptyExemplaire()
->setId(12)
->setTitre('Alice au pays des merveilles')
......@@ -129,7 +129,7 @@ class AbonneControllerTelephoneFicheTest extends AbonneControllerTelephoneTestCa
/** @test */
public function pageShouldDisplayLintToIndex() {
$this->assertXPath('//a[@href = "/"]');
$this->assertXPath('//a[@href = "/index/index/id_profil/2"]');
}
}
......@@ -164,7 +164,7 @@ class AbonneControllerTelephoneCancelHoldTest extends AbonneControllerTelephoneT
class AbonneControllerTelephoneCancelHoldWithErrorTest extends AbonneControllerTelephoneTestCase {
public function setUp() {
parent::setUp();
$fiche_sigb = $this->_user->getFicheSigb();
$fiche_sigb['erreur'] = 'Soucis avec le webservice';
$this->_user->setFicheSigb($fiche_sigb);
......
......@@ -72,7 +72,7 @@ abstract class AbstractIndexControllerTelephoneWithModulesTest extends Telephone
'preferences' => ['titre' => 'Critiques']]
]];
$this->profil_adulte = $this->fixture('Class_Profil', ['id' => 3])
$this->profil_adulte = $this->fixture('Class_Profil', ['id' => 2])
->setTitreSite('Smartphone')
->setLibelle(null)
->setCfgAccueil($cfg_accueil)
......@@ -108,7 +108,7 @@ class IndexControllerTelephoneOnSubpageTest extends AbstractIndexControllerTelep
/** @test */
public function homeButtonShouldBePresent() {
$this->assertXPathContentContains('//div[@data-role="navbar"]//a[@href="/index/index/id_profil/3"]', 'Accueil');
$this->assertXPathContentContains('//div[@data-role="navbar"]//a[@href="/index/index/id_profil/2"]', 'Accueil');
}
}
......@@ -129,7 +129,7 @@ class IndexControllerTelephoneWithoutPackMobileButBibNumTest extends AbstractInd
/** @test */
public function homeButtonShouldBePresent() {
$this->assertXPathContentContains('//div[@data-role="navbar"]//a[@href="/index/index/id_profil/3"]', 'Accueil');
$this->assertXPathContentContains('//div[@data-role="navbar"]//a[@href="/index/index/id_profil/2"]', 'Accueil');
}
......@@ -377,10 +377,11 @@ class IndexControllerTelephoneWithModulesAndUserLoggedTest extends AbstractIndex
class IndexControllerWithProfilPortailGoBackPhoneTest extends AbstractIndexControllerTelephoneWithModulesTest {
public function setUp() {
parent::setUp();
Class_Profil::setCurrentProfil(Class_Profil::getLoader()
->newInstanceWithId(1)
->setBrowser('opac')
->setTitreSite('portail'));
$this->fixture('Class_Profil',
['id' => 1,
'browser' => 'opac',
'titre_site' => 'portail'])
->beCurrentProfil();
Zend_Registry::get('session')->id_profil = 1;
$this->dispatch('/telephone');
......@@ -389,7 +390,8 @@ class IndexControllerWithProfilPortailGoBackPhoneTest extends AbstractIndexContr
/** @test */
public function currentProfilShouldBeTelephoneAdulte() {
$this->assertEquals($this->profil_adulte, Class_Profil::getCurrentProfil());
$this->assertEquals($this->profil_adulte,
Class_Profil::getCurrentProfil());
}
}
......
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