本文整理汇总了PHP中Admin::slettKunde方法的典型用法代码示例。如果您正苦于以下问题:PHP Admin::slettKunde方法的具体用法?PHP Admin::slettKunde怎么用?PHP Admin::slettKunde使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Admin
的用法示例。
在下文中一共展示了Admin::slettKunde方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Admin
/**
* @author Øyvind Ahlstrøm
* @version 1.0, 2016.01.26
*
* Denne testen sjekker om dersom et personnummer har et duplikat.
* @assert string "Duplikat"
*/
function testSlettKunde_duplikater()
{
// Arrange
$admin = new Admin(new DBStubAdmin());
$personnummer = "00000000001";
// Act
$resultat = $admin->slettKunde($personnummer);
// Asssert
$this->assertEquals("Duplikat", $resultat);
}
示例2: testSlettUgyldigKunde
public function testSlettUgyldigKunde()
{
//Arrange
$admin = new Admin(new adminDBStubSqlite());
$personnummer = "987654321";
//Act
$OK = $admin->slettKunde($personnummer);
//Assert
$this->assertEquals("Feil", $OK);
}
示例3: Admin
function testSlettKunde1()
{
$adminDB = new Admin(new ADBstub());
$kunde1 = new kunde();
$kunde1->personnummer = "12345678902";
$result = $adminDB->slettKunde($kunde1->personnummer);
$this->assertEquals("Feil", $result);
}
示例4: Admin
function test_slettKunde_OK()
{
//arrange
$adminLogikk = new Admin(new adminDatabaseStub());
//act
$kunde = new kunde();
$kunde->personnummer = "18029436989";
$kunde->fornavn = "Petter";
$kunde->etternavn = "Olavsen";
$kunde->adresse = "Osloveien 82 0270 Oslo";
$OK = $adminLogikk->slettKunde($kunde->personnummer);
//assert
$this->assertEquals("OK", $OK);
}
示例5: testSlettKundeFEIL
public function testSlettKundeFEIL()
{
//arrange
$adminLogikk = new Admin(new DBStub());
$personnummer = "15058139780";
//act
$OK = $adminLogikk->slettKunde($personnummer);
//assert
$this->assertEquals("Feil", $OK);
}