function PaymentmethodbasicTestModuleInstallUninstall::testInstallationAndUninstallation in Payment 7
Test installation and uninstallation.
File
- modules/
paymentmethodbasic/ tests/ paymentmethodbasic_test/ tests/ PaymentmethodbasicTestModuleInstallUninstall.test, line 34 - Contains PaymentmethodbasicTestModuleInstallUninstall.
Class
- PaymentmethodbasicTestModuleInstallUninstall
- Tests module installation and uninstallation.
Code
function testInstallationAndUninstallation() {
$this
->assertTrue(module_exists('paymentmethodbasic'));
// Test default configuration.
$names = array(
'collect_on_delivery',
'no_payment_required',
);
$payment_methods = entity_load('payment_method');
$payment_method_names = array();
foreach ($payment_methods as $payment_method) {
$payment_method_names[] = $payment_method->name;
}
$this
->assertFalse(array_diff($names, $payment_method_names));
module_disable(array(
'paymentmethodbasic',
));
drupal_uninstall_modules(array(
'paymentmethodbasic',
));
$this
->assertFalse(module_exists('paymentmethodbasic'));
}