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


PHP Admin::hentAlleKunder方法代码示例

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


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

示例1: testHentAlleKunder

 function testHentAlleKunder()
 {
     $adminDB = new Admin(new ADBstub());
     $kunde1 = new kunde();
     $kunde1->personnummer = "01010122344";
     $kunde1->navn = "Per Olsen";
     $kunde1->adresse = "Osloveien 82 0270 Oslo";
     $kunde1->telefonnr = "12345678";
     $alleKunder[] = $kunde1;
     $kunde2 = new kunde();
     $kunde2->personnummer = "01010122344";
     $kunde2->navn = "Line Jensen";
     $kunde2->adresse = "Askerveien 100, 1379 Asker";
     $kunde2->telefonnr = "92876789";
     $alleKunder[] = $kunde2;
     $kunde3 = new kunde();
     $kunde3->personnummer = "02020233455";
     $kunde3->navn = "Ole Olsen";
     $kunde3->adresse = "Bærumsveien 23, 1234 Bærum";
     $kunde3->telefonnr = "99889988";
     $alleKunder = $adminDB->hentAlleKunder();
     $this->assertEquals($kunde1, $alleKunder[0]);
     $this->assertEquals($kunde2, $alleKunder[1]);
     $this->assertEquals($kunde3, $alleKunder[2]);
 }
开发者ID:Adsime,项目名称:TestingCourse,代码行数:25,代码来源:adminLogikkTest.php

示例2: testHentAlleKunder

 public function testHentAlleKunder()
 {
     //Arrange
     $admin = new Admin(new adminDBStubSqlite());
     //Act
     $kunder = $admin->hentAlleKunder();
     //Assert
     $this->assertEquals(3, count($kunder));
     $this->assertObjectHasAttribute("Personnummer", $kunder[0]);
     $this->assertObjectHasAttribute("Fornavn", $kunder[0]);
     $this->assertObjectHasAttribute("Etternavn", $kunder[0]);
     $this->assertObjectHasAttribute("Adresse", $kunder[0]);
     $this->assertObjectHasAttribute("Postnr", $kunder[0]);
     $this->assertObjectHasAttribute("Telefonnr", $kunder[0]);
     $this->assertObjectHasAttribute("Passord", $kunder[0]);
     $this->assertObjectHasAttribute("Poststed", $kunder[0]);
 }
开发者ID:kringon,项目名称:scotch-box,代码行数:17,代码来源:hentAlleKunderTest.php

示例3: Admin

 function test_hentAlleKunder()
 {
     $admin = new Admin(new AdminDBStub());
     $retur = $admin->hentAlleKunder();
     //$this->assertInternalType("array", $retur);
     $this->assertEquals("01010122344", $retur[0]->personnummer);
     $this->assertEquals("Per Olsen", $retur[0]->navn);
     $this->assertEquals("Osloveien 82 0270 Oslo", $retur[0]->adresse);
     $this->assertEquals("12345678", $retur[0]->telefonnr);
     $this->assertEquals("01010122344", $retur[1]->personnummer);
     $this->assertEquals("Line Jensen", $retur[1]->navn);
     $this->assertEquals("Askerveien 100, 1379 Asker", $retur[1]->adresse);
     $this->assertEquals("92876789", $retur[1]->telefonnr);
     $this->assertEquals("02020233455", $retur[2]->personnummer);
     $this->assertEquals("Ole Olsen", $retur[2]->navn);
     $this->assertEquals("Bærumsveien 23, 1234 Bærum", $retur[2]->adresse);
     $this->assertEquals("99889988", $retur[2]->telefonnr);
 }
开发者ID:jonms90,项目名称:PHPTest,代码行数:18,代码来源:HentAlleKunderTest.php

示例4: testHentAlleKunder

 public function testHentAlleKunder()
 {
     //arrange
     $adminLogikk = new Admin(new DBStub());
     //act
     $kunder = $adminLogikk->hentAlleKunder();
     //assert
     $this->assertEquals("01010122344", $kunder[0]->personnummer);
     $this->assertEquals("Per Olsen", $kunder[0]->navn);
     $this->assertEquals("Osloveien 82 0270 Oslo", $kunder[0]->adresse);
     $this->assertEquals("12345678", $kunder[0]->telefonnr);
     $this->assertEquals("01010122344", $kunder[1]->personnummer);
     $this->assertEquals("Line Jensen", $kunder[1]->navn);
     $this->assertEquals("Askerveien 100, 1379 Asker", $kunder[1]->adresse);
     $this->assertEquals("92876789", $kunder[1]->telefonnr);
     $this->assertEquals("02020233455", $kunder[2]->personnummer);
     $this->assertEquals("Ole Olsen", $kunder[2]->navn);
     $this->assertEquals("Berumsveien 23, 1234 Berum", $kunder[2]->adresse);
     $this->assertEquals("99889988", $kunder[2]->telefonnr);
 }
开发者ID:OutCrack,项目名称:Testing-av-Programvare,代码行数:20,代码来源:adminLogikkTest.php

示例5: Admin

 function test_hentAlleKunder()
 {
     //arrange
     $adminLogikk = new Admin(new adminDatabaseStub());
     //act
     $kunder = $adminLogikk->hentAlleKunder();
     //assert
     $this->assertEquals("Petter", $kunder[0]->fornavn);
     $this->assertEquals("Kristiansen", $kunder[0]->etternavn);
     $this->assertEquals("Fugleveien 5 1263 Oslo", $kunder[0]->adresse);
     $this->assertEquals("87900034123", $kunder[0]->kontonummer);
     $this->assertEquals("18029536879", $kunder[0]->personnummer);
     $this->assertEquals("Ivar", $kunder[1]->fornavn);
     $this->assertEquals("Aasen", $kunder[1]->etternavn);
     $this->assertEquals("Henrik Ibsensgate 90 1063 Oslo", $kunder[1]->adresse);
     $this->assertEquals("76900064123", $kunder[1]->kontonummer);
     $this->assertEquals("16129537879", $kunder[1]->personnummer);
     $this->assertEquals("Magnus", $kunder[2]->fornavn);
     $this->assertEquals("Karlsen", $kunder[2]->etternavn);
     $this->assertEquals("Apelia 35 1267 Oslo", $kunder[2]->adresse);
     $this->assertEquals("39900074123", $kunder[2]->kontonummer);
     $this->assertEquals("10039546899", $kunder[2]->personnummer);
 }
开发者ID:Jagjitcsingh,项目名称:TestBankApplication,代码行数:23,代码来源:adminTest.php

示例6: Admin

 /**
  * @author Øyvind Ahlstrøm
  * @version 1.0, 2016.01.11
  * 
  * Denne testen teller antall elementer i arrayet som blir returnert fra stub.
  * @assert 3
  */
 function testHentAlleKunder_hentAntall()
 {
     // Arrange
     $admin = new Admin(new DBStubAdmin());
     // Act
     $resultat = $admin->hentAlleKunder();
     // Assert
     $this->assertEquals(3, count($resultat));
 }
开发者ID:oyvindahlstrom,项目名称:TestingBank,代码行数:16,代码来源:hentAlleKunderTest.php


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