Total Lines | 19 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
26 | public function testExecuteForce() |
||
27 | { |
||
28 | $writer = new class implements WriteInterface { |
||
|
|||
29 | public $content = ''; |
||
30 | |||
31 | public function write(string $content, string $fileName): void |
||
32 | { |
||
33 | $this->content .= $content; |
||
34 | } |
||
35 | }; |
||
36 | $tester = new CommandTester(new AddTestCommand(null, $writer)); |
||
37 | $tester->execute([ |
||
38 | 'entity' => Hubby::class, |
||
39 | '--force' => true, |
||
40 | ]); |
||
41 | |||
42 | $content = $writer->content; |
||
43 | |||
44 | $this->assertContains('AddCest', $content); |
||
45 | } |
||
47 |
Classes in PHP are usually named in CamelCase.
In camelCase names are written without any punctuation, the start of each new word being marked by a capital letter. The whole name starts with a capital letter as well.
Thus the name database provider becomes
DatabaseProvider
.