1 | <?php |
||
16 | trait TestCaseTrait |
||
17 | { |
||
18 | |||
19 | /** |
||
20 | * Migrate the database. |
||
21 | */ |
||
22 | public function migrateDatabase() |
||
26 | |||
27 | /** |
||
28 | * override default URL subDomain in case you want to change it for some tests |
||
29 | * |
||
30 | * @param $subDomain |
||
31 | * @param null $url |
||
32 | */ |
||
33 | public function overrideSubDomain($subDomain, $url = null) |
||
48 | |||
49 | } |
||
50 |
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: