Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class AccountAssociatorTest extends TestCase
- {
- private $clientRepository;
- public function setup()
- {
- $client = new Client(['name' => 'Gandalf', 'cpf' => '87511196098']);
- $this->clientRepository = new ClientRepositoryFake();
- $this->clientRepository->save($user);
- }
- public function testAssociateAccountToClientShouldGenerateAccountNumber()
- {
- $client = $this->clientRepository->find(1);
- $account = new Account();
- $account->setClient($client);
- $accountAssociator = AccountAssociator();
- $accountAssociator->associateAccountToClient($account, $client);
- $this->assertNotNull($account->getNumber());
- }
- }
Add Comment
Please, Sign In to add comment