本文整理汇总了PHP中Bank::hentBetalinger方法的典型用法代码示例。如果您正苦于以下问题:PHP Bank::hentBetalinger方法的具体用法?PHP Bank::hentBetalinger怎么用?PHP Bank::hentBetalinger使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Bank
的用法示例。
在下文中一共展示了Bank::hentBetalinger方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testHentFlereBetalinger
public function testHentFlereBetalinger()
{
//Arrange
$bank = new Bank(new DBStubSqlite());
$personnummer = "11223344556";
//Act
$betalinger = $bank->hentBetalinger($personnummer);
//Assert
$this->assertEquals(3, count($betalinger));
$this->assertEquals("6", $betalinger[0]->TxID);
$this->assertEquals("12312345", $betalinger[0]->FraTilKontonummer);
$this->assertEquals("1234", $betalinger[0]->Belop);
$this->assertEquals("2012-12-12", $betalinger[0]->Dato);
$this->assertEquals("Melding", $betalinger[0]->Melding);
$this->assertEquals("234567", $betalinger[0]->Kontonummer);
$this->assertEquals("1", $betalinger[0]->Avventer);
$this->assertEquals("11", $betalinger[1]->TxID);
$this->assertEquals("12312345", $betalinger[1]->FraTilKontonummer);
$this->assertEquals("99.99", $betalinger[1]->Belop);
$this->assertEquals("2012-12-11", $betalinger[1]->Dato);
$this->assertEquals("Avgift på smørbrød til lucifer selv", $betalinger[1]->Melding);
$this->assertEquals("234567", $betalinger[1]->Kontonummer);
$this->assertEquals("1", $betalinger[1]->Avventer);
$this->assertEquals("3", $betalinger[2]->TxID);
$this->assertEquals("20102012345", $betalinger[2]->FraTilKontonummer);
$this->assertEquals("-1400.7", $betalinger[2]->Belop);
$this->assertEquals("2015-03-13", $betalinger[2]->Dato);
$this->assertEquals("Husleie", $betalinger[2]->Melding);
$this->assertEquals("55551166677", $betalinger[2]->Kontonummer);
$this->assertEquals("1", $betalinger[2]->Avventer);
}
示例2: test_hentBetalinger_OK
public function test_hentBetalinger_OK()
{
//Arrange
$bank = new Bank(new BankDBStub());
//Act
$betalinger = $bank->hentBetalinger("16019312345");
//Assert
$this->assertEquals(2, count($betalinger));
}
示例3: testHentBetalingMedUgyldigeData
function testHentBetalingMedUgyldigeData()
{
// Arrange
$personnummer = "12345678909";
$bank = new Bank(new DBStub());
// Act
$betaling = $bank->hentBetalinger($personnummer);
// Assert
$this->assertEmpty($betaling);
}
示例4: testHentBetalinger_TomtArray
/**
* @author Robin Sean Aron David Lundh & Øyvind Ahlstrøm
* @version 1.0, 2015.01.25
*
* Denne tester sender et personnummer til stub som ikke er knyttet til en
* transaksjon
* @assert empty array
*/
public function testHentBetalinger_TomtArray()
{
// Arrange
$personnummer = "010101105233";
$bank = new Bank(new DBStub());
$tomtArray = array();
// Act
$betalinger = $bank->hentBetalinger($personnummer);
// Assert
$this->assertEquals(0, count($betalinger));
$this->assertEquals($tomtArray, $betalinger);
}
示例5: testHentBetalinger
public function testHentBetalinger()
{
//arrange
$personnummer = "123";
$transak = array();
$trans1 = new transaksjon();
$trans1->avventer = 1;
$transak[0] = $trans1;
$trans2 = new transaksjon();
$trans2->avventer = 1;
$transak[1] = $trans2;
$trans3 = new transaksjon();
$trans3->avventer = 1;
$transak[2] = $trans3;
$bank = new Bank(new DBStub());
//act
$res = $bank->hentBetalinger($personnummer);
//assert
$this->assertEquals($res, $transak);
}
示例6: testHentBetaling
public function testHentBetaling()
{
$pnr = '06128739813';
$bank = new Bank(new BankDatabaseStub());
$resultat = $bank->hentBetalinger($pnr);
static::assertEquals($resultat[0]->belop, 1);
static::assertEquals($resultat[1]->belop, 12);
static::assertEquals($resultat[2]->belop, 123);
}