Completed
Push — master ( 01b9e4...761718 )
by Yaroslav
02:28 queued 12s
created

PageAdminTest::testConfigureFormFields()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 15

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 15
rs 9.7666
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Harentius\BlogBundle\Tests\Unit\Admin\Admin;
6
7
use Harentius\BlogBundle\Admin\Admin\PageAdmin;
8
use Harentius\BlogBundle\Test\SonataAdminClassTestCase;
9
10
class PageAdminTest extends SonataAdminClassTestCase
11
{
12 View Code Duplication
    public function testConfigureListFields(): void
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
13
    {
14
        $articleAdmin = $this->createAdmin(PageAdmin::class);
15
        $this->assertHasListFields($articleAdmin, [
16
            'title',
17
            'slug',
18
            'author',
19
            'published',
20
            'publishedAt',
21
            'metaDescription',
22
            'metaKeywords',
23
            '_action',
24
        ]);
25
    }
26
27
    public function testConfigureFormFields(): void
28
    {
29
        $articleAdmin = $this->createAdmin(PageAdmin::class);
30
        $this->assertHasFormFields($articleAdmin, [
31
            'title',
32
            'slug',
33
            'text',
34
            'published',
35
            'showInMainMenu',
36
            'publishedAt',
37
            'author',
38
            'metaDescription',
39
            'metaKeywords',
40
        ]);
41
    }
42
}
43