DonationFactory.php
5 years ago
DonationFormFactory.php
5 years ago
DonorFactory.php
5 years ago
PageFactory.php
5 years ago
RevenueFactory.php
5 years ago
RevenueFactory.php
19 lines
| 1 | <?php |
| 2 | |
| 3 | namespace Give\TestData\Factories; |
| 4 | |
| 5 | use Give\ValueObjects\Money; |
| 6 | use Give\TestData\Framework\Factory; |
| 7 | |
| 8 | class RevenueFactory extends Factory { |
| 9 | public function definition() { |
| 10 | $donationForm = $this->randomDonationForm(); |
| 11 | |
| 12 | return [ |
| 13 | 'donation_id' => $this->randomDonation(), |
| 14 | 'form_id' => $donationForm['id'], |
| 15 | 'amount' => Money::of( $this->randomAmount(), give_get_option( 'currency' ) )->getMinorAmount(), |
| 16 | ]; |
| 17 | } |
| 18 | } |
| 19 |