Línea 33... |
Línea 33... |
33 |
* @copyright 2020 Marina Glancy
|
33 |
* @copyright 2020 Marina Glancy
|
34 |
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
34 |
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
35 |
*/
|
35 |
*/
|
36 |
class generator_test extends \advanced_testcase {
|
36 |
class generator_test extends \advanced_testcase {
|
Línea 37... |
Línea 37... |
37 |
|
37 |
|
38 |
public function test_create_account() {
|
38 |
public function test_create_account(): void {
|
39 |
global $DB;
|
39 |
global $DB;
|
40 |
$this->resetAfterTest();
|
40 |
$this->resetAfterTest();
|
41 |
/** @var \core_payment_generator $generator */
|
41 |
/** @var \core_payment_generator $generator */
|
42 |
$generator = $this->getDataGenerator()->get_plugin_generator('core_payment');
|
42 |
$generator = $this->getDataGenerator()->get_plugin_generator('core_payment');
|
Línea 55... |
Línea 55... |
55 |
$this->assertEmpty($DB->get_records('payment_gateways', ['accountid' => $account1->get('id')]));
|
55 |
$this->assertEmpty($DB->get_records('payment_gateways', ['accountid' => $account1->get('id')]));
|
56 |
// Second account has.
|
56 |
// Second account has.
|
57 |
$this->assertCount(1, $DB->get_records('payment_gateways', ['accountid' => $account2->get('id')]));
|
57 |
$this->assertCount(1, $DB->get_records('payment_gateways', ['accountid' => $account2->get('id')]));
|
58 |
}
|
58 |
}
|
Línea 59... |
Línea 59... |
59 |
|
59 |
|
60 |
public function test_create_payment() {
|
60 |
public function test_create_payment(): void {
|
61 |
global $DB;
|
61 |
global $DB;
|
62 |
$this->resetAfterTest();
|
62 |
$this->resetAfterTest();
|
63 |
/** @var \core_payment_generator $generator */
|
63 |
/** @var \core_payment_generator $generator */
|
64 |
$generator = $this->getDataGenerator()->get_plugin_generator('core_payment');
|
64 |
$generator = $this->getDataGenerator()->get_plugin_generator('core_payment');
|