Guest User

Untitled

a guest
May 23rd, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. <?php
  2. class AccountAssociatorTest extends TestCase
  3. {
  4. private $clientRepository;
  5.  
  6. public function setup()
  7. {
  8. $client = new Client(['name' => 'Gandalf', 'cpf' => '87511196098']);
  9. $this->clientRepository = new ClientRepositoryFake();
  10. $this->clientRepository->save($user);
  11. }
  12.  
  13. public function testAssociateAccountToClientShouldGenerateAccountNumber()
  14. {
  15. $client = $this->clientRepository->find(1);
  16. $account = new Account();
  17. $account->setClient($client);
  18. $accountAssociator = AccountAssociator();
  19. $accountAssociator->associateAccountToClient($account, $client);
  20.  
  21. $this->assertNotNull($account->getNumber());
  22. }
  23. }
Add Comment
Please, Sign In to add comment