コード例 #1
0
ファイル: test_trees.php プロジェクト: nikonehauser/pt
<?php

include dirname(__FILE__) . '/bootstrap.php';
$con = Propel::getConnection();
DbEntityHelper::setCon($con);
DbEntityHelper::truncateDatabase();
list(list($IT, $VL, $OL, $PM, $VS2, $VS1), list($trfIT, $trfVL, $trfOL, $trfPM, $trfVS2, $trfVS1), ) = DbEntityHelper::setUpBonusMembers(false);
$pm1 = DbEntityHelper::createSignupMember($PM);
$pm2 = DbEntityHelper::createSignupMember($PM);
$pm3 = DbEntityHelper::createSignupMember($PM);
$pm4 = DbEntityHelper::createSignupMember($PM);
$pm5 = DbEntityHelper::createSignupMember($PM);
$pm1_1 = DbEntityHelper::createSignupMember($pm1);
$pm1_2 = DbEntityHelper::createSignupMember($pm1);
$pm1_3 = DbEntityHelper::createSignupMember($pm1);
$pm1_4 = DbEntityHelper::createSignupMember($pm1);
$pm1_5 = DbEntityHelper::createSignupMember($pm1);
$pm1_6 = DbEntityHelper::createSignupMember($pm1);
$pm2_1 = DbEntityHelper::createSignupMember($pm2);
$pm2_1_1 = DbEntityHelper::createSignupMember($pm2_1);
$pm2_1_1_1 = DbEntityHelper::createSignupMember($pm2_1_1);
$pm2_1_1_1_1 = DbEntityHelper::createSignupMember($pm2_1_1_1);
$pm2_1_1_1_1_1 = DbEntityHelper::createSignupMember($pm2_1_1_1_1);
DbEntityHelper::createSignupMember($pm2_1_1_1_1_1);
DbEntityHelper::createSignupMember($pm2_1_1_1_1_1);
DbEntityHelper::createSignupMember($pm2_1_1_1_1_1);
DbEntityHelper::createSignupMember($pm4);
DbEntityHelper::createSignupMember($pm4);
コード例 #2
0
 public function testVariant12()
 {
     /**
      * OL - Neues Mitglied
      * 22$
      * ------------------------------------------*/
     /* Setup
        ---------------------------------------------*/
     DbEntityHelper::setCon(self::$propelCon);
     list(list($IT, $VL, $OL, $PM, $VS2, $VS1), list($trfIT, $trfVL, $trfOL, $trfPM, $trfVS2, $trfVS1), ) = DbEntityHelper::setUpBonusMembers(true, ['VL' => false]);
     $new = DbEntityHelper::createSignupMember($OL);
     $trfIT += Transaction::getAmountForReason(Transaction::REASON_IT_BONUS);
     // $trfVL += Transaction::getAmountForReason(Transaction::REASON_VL_BONUS);
     $trfOL += Transaction::getAmountForReason(Transaction::REASON_OL_BONUS) + Transaction::getAmountForReason(Transaction::REASON_PM_BONUS) + Transaction::getAmountForReason(Transaction::REASON_ADVERTISED_LVL2);
     // $trfPM += Transaction::getAmountForReason(Transaction::REASON_PM_BONUS);
     // $trfVS2 += Transaction::getAmountForReason(Transaction::REASON_ADVERTISED_INDIRECT);
     // $trfVS1 += Transaction::getAmountForReason(Transaction::REASON_ADVERTISED_LVL1);
     $this->assertTransferTotal($trfIT, $IT);
     // $this->assertTransferTotal($trfVL, $VL);
     $this->assertTransferTotal($trfOL, $OL);
     $this->assertTransferTotal($trfPM, $PM);
     $this->assertTransferTotal($trfVS2, $VS2);
     $this->assertTransferTotal($trfVS1, $VS1);
 }