Skip to content

SMS notifier. Closes #30.#74

Closed
ghost wants to merge 6 commits intoGizra:8.x-1.xfrom
portlandwebworks:sms_notifier
Closed

SMS notifier. Closes #30.#74
ghost wants to merge 6 commits intoGizra:8.x-1.xfrom
portlandwebworks:sms_notifier

Conversation

@ghost
Copy link

@ghost ghost commented Jan 10, 2019

Implements an SMS notifier (connects message module to the sms module).

Copy link
Contributor

@jhedstrom jhedstrom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is looking great! Thanks for working on this.

The main feedback below is to split this off into a sub-module (message_notify_sms) rather than require all of the sms stuff for all users of this module.

It would also be great to have a kernel test in addition to the unit test I think to make sure the end-to-end functionality is working.

@amitaibu
Copy link
Member

Thanks @fskreuz working on this! 😄

Copy link

@dpi dpi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feedback from SMS Framework maintainer.

// SmsMessage.php#L326 is calling uuid service directly. Need to setup
// fake container for this test.
$container = new ContainerBuilder();
$container->set('uuid', $this->getMockUuidService());
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could subclass \Drupal\sms\Message\SmsMessage in your test file and override the uuid generator method

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one I couldn't wrap my head around. I saw one test extending SmsMessage and was planning to do that. But not sure how that would work when the usage of SmsMessage is in the plugin, not the test.

I'm not yet that familiar with Drupal's injection system 😓 Any pointers would help.

@jhedstrom
Copy link
Contributor

I've added #76 to fix the tests.

Copy link

@dpi dpi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

require/doc notes

@ghost
Copy link
Author

ghost commented Jan 16, 2019

Hey everyone! I think I've added all that's needed (including kernel tests) and I think this is ready to go. Let me know if I missed anything. Thanks again for everyone's help. 😁

@ghost ghost closed this Jan 16, 2019
@ghost ghost deleted the sms_notifier branch January 16, 2019 15:02
@ghost
Copy link
Author

ghost commented Jan 16, 2019

Closing this PR for now while I do cleanup. Will create a separate PR (now here #77).

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants