| 1 | <?php |
||
| 3 | class ViewTest extends TestCase { |
||
| 4 | |||
| 5 | public function setUp() |
||
| 38 | |||
| 39 | public function testBootstrap2() |
||
| 40 | { |
||
| 41 | $html = $this->view->render('breadcrumbs::bootstrap2', $this->breadcrumbs); |
||
| 42 | $this->assertXmlStringEqualsXmlFile(__DIR__ . '/../fixtures/bootstrap2.html', $html); |
||
| 43 | } |
||
| 44 | |||
| 45 | public function testBootstrap3() |
||
| 46 | { |
||
| 47 | $html = $this->view->render('breadcrumbs::bootstrap3', $this->breadcrumbs); |
||
| 48 | $this->assertXmlStringEqualsXmlFile(__DIR__ . '/../fixtures/bootstrap3.html', $html); |
||
| 49 | } |
||
| 50 | |||
| 51 | } |
||
| 52 |
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: