当前位置: 首页>>代码示例>>PHP>>正文


PHP Bank::hentKundeInfo方法代码示例

本文整理汇总了PHP中Bank::hentKundeInfo方法的典型用法代码示例。如果您正苦于以下问题:PHP Bank::hentKundeInfo方法的具体用法?PHP Bank::hentKundeInfo怎么用?PHP Bank::hentKundeInfo使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Bank的用法示例。


在下文中一共展示了Bank::hentKundeInfo方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: testEndreUgyldigKunde

 public function testEndreUgyldigKunde()
 {
     //Arrange
     $bank = new Bank(new DBStubSqlite());
     $kunde = new kunde();
     $kunde->personnummer = "11122233312";
     $kunde->fornavn = "Ugyldig";
     $kunde->etternavn = "Person";
     $kunde->adresse = "Luftslåttveien 22";
     $kunde->postnr = "1387";
     $kunde->poststed = "Asker";
     $kunde->telefonnr = "22224444";
     $kunde->passord = "11122233312";
     //Act
     $OK = $bank->hentKundeInfo($kunde->personnummer);
     $this->assertEquals("Feil", $OK);
     $oppdatertKunde = clone $kunde;
     $oppdatertKunde->fornavn = "Lina";
     $oppdatertKunde->etternavn = "Jonvik";
     $oppdatertKunde->adresse = "Slaskebakken 22";
     $OK = $bank->endreKundeInfo($oppdatertKunde);
     $this->assertEquals("OK", $OK);
     $OK = $bank->hentKundeInfo($kunde->personnummer);
     $this->assertEquals("Feil", $OK);
 }
开发者ID:kringon,项目名称:scotch-box,代码行数:25,代码来源:endreKundeInfoBLTest.php

示例2: testHentGyldigKunde

 public function testHentGyldigKunde()
 {
     //Arrange
     $bank = new Bank(new DBStubSqlite());
     $personnummer = "09048433711";
     //Act
     $kunde = $bank->hentKundeInfo($personnummer);
     //Assert
     $this->assertInstanceOf("kunde", $kunde);
 }
开发者ID:kringon,项目名称:scotch-box,代码行数:10,代码来源:hentKundeInfoTest.php

示例3: testHentKundeInfo_FeilPostSted

 /**
  * @author Øyvind Ahlstrøm
  * @version 1.1, 2016.01.26
  * 
  * Denne testen sender et personnnummer som skal trigge "feil" i poststed.
  * @assert string "Feil"s
  */
 public function testHentKundeInfo_FeilPostSted()
 {
     // Arrange
     $bank = new Bank(new DBStub());
     $personnummer = "00000000001";
     // Act
     $resultat = $bank->hentKundeInfo($personnummer);
     // Assert
     $this->assertEquals("Feil postnr", $resultat);
 }
开发者ID:oyvindahlstrom,项目名称:TestingBank,代码行数:17,代码来源:hentKundeInfoTest.php

示例4: testHentEnKundeInfoMedUgyldigPersonnummer

 public function testHentEnKundeInfoMedUgyldigPersonnummer()
 {
     // Arrange
     $personnummer = "01010122340";
     $bank = new Bank(new DBStub());
     // Act
     $hentKundeInfo = $bank->hentKundeInfo($personnummer);
     // Assert
     // Sjekker om det er ett array
     $this->assertInternalType('array', $hentKundeInfo);
     // Sjekker om array'et er tomt
     $this->assertEmpty($hentKundeInfo);
 }
开发者ID:tleirvik,项目名称:TestingBank,代码行数:13,代码来源:hentKundeInfoTest.php

示例5: testOk

 public function testOk()
 {
     //arrange
     $personnummer = "12504567891";
     $kunde = new kunde();
     $kunde->personnummer = $personnummer;
     $kunde->fornavn = "Arne";
     $kunde->etternavn = "Hansen";
     $kunde->adresse = "Ljansbakken 20";
     $kunde->telefonnr = "22222222";
     $kunde->passord = "123456";
     $kunde->postnr = substr($personnummer, 0, 4);
     $kunde->poststed = "Oslo";
     $bank = new Bank(new DBStub());
     //act
     $res = $bank->hentKundeInfo($personnummer);
     //assert
     $this->assertEquals($kunde, $res);
 }
开发者ID:Jagjitcsingh,项目名称:TestBankApplication,代码行数:19,代码来源:hentKundeInfoTest.php

示例6: testHentKundeInfoIngenKundeMedPersonnummer

 public function testHentKundeInfoIngenKundeMedPersonnummer()
 {
     //arrange
     $bankLogikk = new Bank(new DBStub());
     $personnummer = -010101234567;
     //act
     $kunde = $bankLogikk->hentKundeInfo($personnummer);
     //assert
     $this->assertEquals("Feil", $kunde);
 }
开发者ID:OutCrack,项目名称:Testing-av-Programvare,代码行数:10,代码来源:bankLogikkTest.php

示例7: testHentKundeInfo

 public function testHentKundeInfo()
 {
     $bank = new Bank(new BankDatabaseStub());
     $personnummer = "12345678945";
     static::assertEquals($bank->hentKundeInfo($personnummer), "OK");
     $personnummer = "12345678901";
     static::assertEquals($bank->hentKundeInfo($personnummer), "Feil");
 }
开发者ID:aleksanderaleksic,项目名称:feilfri-bank,代码行数:8,代码来源:BankTest.php


注:本文中的Bank::hentKundeInfo方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。