public function testFindVSPForTradeData()
 {
     $riaRepo = new RiaRepository();
     $ria = $riaRepo->findOneBy(array('email' => '*****@*****.**'));
     $jobRepo = new JobRepository();
     $job = $jobRepo->findOneBy(array('user_id' => $ria->getId()));
     $accountRepo = new AccountRepository();
     $securityRepo = new SecurityRepository();
     $tradeData = new TradeData();
     $tradeData->setJobId($job->getId());
     $tradeData->setAccountId($accountRepo->findOneByAccountNumber('916985328')->getId());
     $tradeData->setSecurityId($securityRepo->findOneBySymbol('RWX')->getId());
     $vsps = $this->repository->findVSPForTradeData($tradeData);
     $vspsExpected = array(array('purchase' => 'VSP', 'purchase_date' => '02132013', 'quantity' => 36), array('purchase' => 'VSP', 'purchase_date' => '02162013', 'quantity' => 20));
     $this->assertEquals($vspsExpected, $vsps);
 }
示例#2
0
 public function testSetAccountId()
 {
     $this->tradeData->setAccountId(12);
     $this->assertEquals(12, $this->tradeData->getAccountId());
 }