# give/4.16.9/src/TestData/Factories/RevenueFactory.php

GiveWP – Donation Plugin and Fundraising Platform, version 4.16.9. 21 lines.

- Page: https://pluginprobe.com/plugins/give/4.16.9/code/src/TestData/Factories/RevenueFactory.php
- Raw: https://pluginprobe.com/plugins/give/4.16.9/raw/src/TestData/Factories/RevenueFactory.php
- Modified: 2021-11-23T23:55:18+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/give/4.16.9/code/src/TestData/Factories/RevenueFactory.php#L10-L20`.

```php
<?php

namespace Give\TestData\Factories;

use Give\TestData\Framework\Factory;
use Give\ValueObjects\Money;

class RevenueFactory extends Factory
{
    public function definition()
    {
        $donationForm = $this->randomDonationForm();

        return [
            'donation_id' => $this->randomDonation(),
            'form_id' => $donationForm['id'],
            'amount' => Money::of($this->randomAmount(), give_get_option('currency'))->getMinorAmount(),
        ];
    }
}

```
