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


PHP Admin::registrerKunde方法代码示例

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


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

示例1: testRegistrereTomKunde

 /**
  * @expectedException PDOException
  * @expectedExceptionCode 23000
  * @expectedExceptionMessage Integrity constraint violation: 19 NOT NULL constraint failed: Poststed.Postnr
  *
  */
 public function testRegistrereTomKunde()
 {
     //Arrange
     $admin = new Admin(new adminDBStubSqlite());
     $kunde = new kunde();
     //Act (Assert is in comments above)
     //Act
     $OK = $admin->registrerKunde($kunde);
     //@codeCoverageIgnoreStart
 }
开发者ID:kringon,项目名称:scotch-box,代码行数:16,代码来源:registrerKundeTest.php

示例2: Admin

 function test_registrerKundeFeil()
 {
     $admin = new Admin(new AdminDBStub());
     $kunde = new kunde();
     $kunde->personnummer = "12121212121";
     $kunde->fornavn = null;
     $kunde->etternavn = "Larsen";
     $kunde->poststed = "Osloveien 2";
     $kunde->postnr = "0678";
     $kunde->poststed = "Oslo";
     $kunde->telefonnr = "12345678";
     $kunde->passord = "Passord";
     $feil = $admin->registrerKunde($kunde);
     $this->assertEquals("Feil", $feil);
 }
开发者ID:jonms90,项目名称:PHPTest,代码行数:15,代码来源:registrerKundeTest.php

示例3: Admin

 /**
  * @author Øyvind Ahlstrøm, Robin Sean Aron David Lundh & Kristian Ulvund
  * @version 1.0, 2016.01.25
  * 
  * Denne testen sender et kunde objekt med postnummer som ikke samsvarer med stub
  * @assert string "Feil"
  */
 function testRegistrerKunde_sjekkPostnrFeil()
 {
     // Arrange
     $admin = new Admin(new DBStubAdmin());
     $kunde = new Kunde();
     $kunde->personnummer = "11111122222";
     $kunde->fornavn = "Helge";
     $kunde->etternavn = "Halvorsen";
     $kunde->adresse = "Oslo gate 10";
     $kunde->postnr = "0002";
     $kunde->poststed = "Oslo";
     $kunde->telefonnr = "99887766";
     $kunde->passord = "Passord";
     // Act
     $endre = $admin->registrerKunde($kunde);
     // Assert
     $this->assertEquals("Feil", $endre);
 }
开发者ID:oyvindahlstrom,项目名称:TestingBank,代码行数:25,代码来源:registrerKundeTest.php

示例4: Admin

 function testRegistrerKunde2()
 {
     $adminDB = new Admin(new ADBstub());
     $kunde1 = new kunde();
     $kunde1->navn = "Per Olsen";
     $kunde1->adresse = "Osloveien 82 0270 Oslo";
     $result = $adminDB->registrerKunde($kunde1);
     $this->assertEquals("Feil", $result);
 }
开发者ID:Adsime,项目名称:TestingCourse,代码行数:9,代码来源:adminLogikkTest.php

示例5: Admin

 function test_registrerKunde_OK()
 {
     //arrange
     $adminLogikk = new Admin(new adminDatabaseStub());
     //act
     $kunde = new kunde();
     $kunde->personnummer = 1;
     $kunde->fornavn = "Petter";
     $kunde->etternavn = "Olavsen";
     $kunde->adresse = "Osloveien 82 0270 Oslo";
     $OK = $adminLogikk->registrerKunde($kunde);
     //assert
     $this->assertEquals("OK", $OK);
 }
开发者ID:Jagjitcsingh,项目名称:TestBankApplication,代码行数:14,代码来源:adminTest.php

示例6: testRegistrerKundeFEIL

 public function testRegistrerKundeFEIL()
 {
     //arrange
     $adminLogikk = new Admin(new DBStub());
     $kunde = new kunde();
     $kunde->personnummer = "15058139780";
     $kunde->navn = "Jannike Storo";
     $kunde->adresse = "Haugerudveien 43 4718 Oslo";
     $kunde->telefonnr = "22486198";
     //act
     $OK = $adminLogikk->registrerKunde($kunde);
     //assert
     $this->assertEquals("Feil", $OK);
 }
开发者ID:OutCrack,项目名称:Testing-av-Programvare,代码行数:14,代码来源:adminLogikkTest.php


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