1 | <?php |
||
14 | trait EventsAdmin |
||
15 | { |
||
16 | |||
17 | /** |
||
18 | * @param string $additional_params |
||
19 | */ |
||
20 | public function amOnDefaultEventsListTablePage($additional_params = '') |
||
24 | |||
25 | |||
26 | /** |
||
27 | * Triggers the publishing of the Event. |
||
28 | */ |
||
29 | public function publishEvent() |
||
33 | |||
34 | |||
35 | /** |
||
36 | * Navigates the actor to the event list table page and will attempt to edit the event for the given title. |
||
37 | * First this will search using the given title and then attempt to edit from the results of the search. |
||
38 | * |
||
39 | * Assumes actor is already logged in. |
||
40 | * @param $event_title |
||
41 | */ |
||
42 | public function amEditingTheEventWithTitle($event_title) |
||
50 | |||
51 | |||
52 | /** |
||
53 | * Navigates the user to the single event page (frontend view) for the given event title via clicking the "View" link |
||
54 | * for the event in the event list table. |
||
55 | * |
||
56 | * Assumes the actor is already logged in and on the Event list table page. |
||
57 | * @param string $event_title |
||
58 | */ |
||
59 | public function amOnEventPageAfterClickingViewLinkInListTableForEvent($event_title) |
||
64 | |||
65 | |||
66 | |||
67 | public function changeDefaultRegistrationStatusTo($registration_status) |
||
74 | } |
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.