| 1 | <?php |
||
| 8 | trait WebAssertTrait |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * Assert that the response view has name |
||
| 12 | * |
||
| 13 | * @param string $name |
||
| 14 | * @param string $message |
||
| 15 | */ |
||
| 16 | 2 | public function assertView($name, $message = '') |
|
| 20 | |||
| 21 | /** |
||
| 22 | * Assert Trait Exists |
||
| 23 | * |
||
| 24 | * @param string $expected |
||
| 25 | * @param Object $object |
||
| 26 | * @param string $message |
||
| 27 | * |
||
| 28 | * @return void |
||
| 29 | * @throws |
||
| 30 | */ |
||
| 31 | 1 | public function assertTraitExists($expected, $object, $message = '') |
|
| 37 | |||
| 38 | /** |
||
| 39 | * Execute method protected |
||
| 40 | * |
||
| 41 | * @param object $object Object |
||
| 42 | * @param string $method Method a Execute |
||
| 43 | * @param array $args Params |
||
| 44 | */ |
||
| 45 | 2 | public function callProtectedMethod($object, $method, array $args = array()) |
|
| 52 | } |
||
| 53 |
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: