1 | <?php |
||
11 | trait MessagesAdmin |
||
12 | { |
||
13 | /** |
||
14 | * @param string $additional_params Any additional request parameters for the generated url should be included as |
||
15 | * a string. |
||
16 | */ |
||
17 | public function amOnMessagesActivityListTablePage($additional_params = '') |
||
21 | |||
22 | /** |
||
23 | * @param string $additional_params Any additional request parameters for the generated url should be included as |
||
24 | * a string. |
||
25 | */ |
||
26 | public function amOnDefaultMessageTemplateListTablePage($additional_params = '') |
||
30 | |||
31 | |||
32 | /** |
||
33 | * @param string $additional_params Any additional request parameters for the generated url should be included as |
||
34 | * a string. |
||
35 | */ |
||
36 | public function amOnCustomMessageTemplateListTablePage($additional_params = '') |
||
40 | |||
41 | |||
42 | /** |
||
43 | * Directs to message settings page |
||
44 | */ |
||
45 | public function amOnMessageSettingsPage() |
||
49 | |||
50 | |||
51 | /** |
||
52 | * Assumes you are already on the list table page that has the ui for editing the template. |
||
53 | * @param string $message_type_slug |
||
54 | * @param string $context [optional] if you want to click directly to the given context in the editor |
||
55 | */ |
||
56 | public function clickToEditMessageTemplateByMessageType($message_type_slug, $context = '') |
||
60 | |||
61 | } |
This check looks for methods that are used by a trait but not required by it.
To illustrate, let’s look at the following code example
The trait
Idable
provides a methodequalsId
that in turn relies on the methodgetId()
. If this method does not exist on a class mixing in this trait, the method will fail.Adding the
getId()
as an abstract method to the trait will make sure it is available.