These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
1 | <?php |
||
2 | |||
3 | namespace Kunstmaan\PagePartBundle\Tests\Entity; |
||
4 | |||
5 | use Kunstmaan\PagePartBundle\Entity\AbstractPagePart; |
||
6 | use PHPUnit\Framework\TestCase; |
||
7 | |||
8 | class PagePart extends AbstractPagePart |
||
9 | { |
||
10 | public function getDefaultView() |
||
11 | { |
||
12 | } |
||
13 | |||
14 | public function getDefaultAdminType() |
||
15 | { |
||
16 | } |
||
17 | } |
||
18 | |||
19 | /** |
||
20 | * Class AbstractPagePartTest |
||
21 | */ |
||
22 | class AbstractPagePartTest extends TestCase |
||
0 ignored issues
–
show
|
|||
23 | { |
||
24 | public function testGetViews() |
||
25 | { |
||
26 | $part = new PagePart(); |
||
27 | $this->assertEquals('', $part->getAdminView()); |
||
28 | $this->assertEquals('', $part->getView()); |
||
29 | } |
||
30 | } |
||
31 |
Having each class in a dedicated file usually plays nice with PSR autoloaders and is therefore a well established practice. If you use other autoloaders, you might not want to follow this rule.