Add test cases for cloud_server_template module

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Xiaohua Guan created an issue. See original summary.

Xiaohua Guan’s picture

Xiaohua Guan’s picture

Status: Active » Needs review
Xiaohua Guan’s picture

@yas

Please review the patch file.

baldwinlouie’s picture

@xioahua-guan, Thank you for the patch. I reviewed this and have the following feedback. When you refactored drupal_set_message, I think it is better to use dependency injection to inject the messenger object into the Form class rather than call the global messenger service using \Drupal::messenger().

Please take a look at AwsCloudContentForm.php's create method on how to set up the messenger object. Then you can look at KeyPairImportForm.php on how to use the messenger object.

What do you think?

Xiaohua Guan’s picture

@baldwinlouie

Thanks for your code review and comment.

> What do you think?
I agree with your way. I will do some modification.

Xiaohua Guan’s picture

Xiaohua Guan’s picture

Xiaohua Guan’s picture

@baldwinlouie

Hi, I attached a new patch file, 3012975_20181113.patch. Please take a look. Thanks.

yas’s picture

Status: Needs review » Reviewed & tested by the community

@xiaohua-guan Thank you for your patch. It looks good to me.

@baldwinlouie, how do you think?

baldwinlouie’s picture

@xiaohua-guan Looks good! Thanks for the patch.

  • yas committed efd8541 on 8.x-1.x authored by Xiaohua Guan
    Issue #3012975 by Xiaohua Guan, baldwinlouie, yas: Add SimpleTest for...
yas’s picture

Status: Reviewed & tested by the community » Fixed

@xiaohua-guan,
@baldwinlouie

Thank you for your efforts.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.