Exemplo n.º 1
0
 /**
  * Assigns an Account to a Party
  *
  * @param Account $account
  * @param AbstractParty $party
  * @return void
  */
 public function assignAccountToParty(Account $account, AbstractParty $party)
 {
     if ($party->getAccounts()->contains($account)) {
         return;
     }
     $party->addAccount($account);
     $accountIdentifier = $this->persistenceManager->getIdentifierByObject($account);
     $this->accountsInPartyRuntimeCache[$accountIdentifier] = $party;
 }
Exemplo n.º 2
0
 /**
  * @test
  */
 public function getAccountsReturnsAccounts()
 {
     $this->assertSame($this->mockAccounts, $this->abstractParty->getAccounts());
 }
Exemplo n.º 3
0
 /**
  * @test
  */
 public function assignAccountToPartyAddsAccount()
 {
     $this->partyService->assignAccountToParty($this->account, $this->party);
     $this->assertContains($this->account, $this->party->getAccounts());
 }