| 1 | <?php |
||
| 15 | abstract class TestCase extends LaravelTestCase |
||
| 16 | { |
||
| 17 | use TestingTrait; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * The base URL to use while testing the application. |
||
| 21 | * |
||
| 22 | * @var string |
||
| 23 | */ |
||
| 24 | protected $baseUrl; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * Setup the test environment, before each test. |
||
| 28 | * |
||
| 29 | * @return void |
||
| 30 | */ |
||
| 31 | public function setUp() |
||
| 41 | |||
| 42 | /** |
||
| 43 | * Reset the test environment, after each test. |
||
| 44 | */ |
||
| 45 | public function tearDown() |
||
| 49 | |||
| 50 | /** |
||
| 51 | * Creates the application. |
||
| 52 | * |
||
| 53 | * @return \Illuminate\Foundation\Application |
||
| 54 | */ |
||
| 55 | public function createApplication() |
||
| 73 | } |
||
| 74 |
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: