Completed
Push — master ( c02fce...0001a8 )
by Johannes
03:23
created

AbstractActionTest::testGetMarkdownCmsConfig()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 4
rs 10
c 1
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
/**
3
 * Lichtenwallner  (https://lichtenwallner.at)
4
 *
5
 * @see https://github.com/jolicht/markdown-cms for the canonical source repository
6
 * @license https://github.com/jolicht/markdown-cms/blob/master/LICENSE MIT
7
 * @copyright Copyright (c) Johannes Lichtenwallner
8
 */
9
declare(strict_types = 1);
10
namespace JolichtTest\MarkdownCms\Action;
11
12
use PHPUnit\Framework\TestCase;
13
use Zend\Expressive\Template\TemplateRendererInterface;
14
use Jolicht\MarkdownCms\Action\AbstractAction;
15
use Jolicht\MarkdownCms\ContentType\EntryParser;
16
17
class AbstractActionTest extends TestCase
18
{
19
    private $action, $templateRenderer, $entryParser, $markdownCmsConfig;
0 ignored issues
show
Coding Style introduced by
It is generally advisable to only define one property per statement.

Only declaring a single property per statement allows you to later on add doc comments more easily.

It is also recommended by PSR2, so it is a common style that many people expect.

Loading history...
20
21
    protected function setUp()
22
    {
23
        $this->templateRenderer = $this->createMock(TemplateRendererInterface::class);
24
        $this->entryParser = $this->createMock(EntryParser::class);
25
        $this->markdownCmsConfig = [
26
            'options' => [
27
28
            ]
29
        ];
30
        $this->action = $this->getMockBuilder(AbstractAction::class)
31
            ->setConstructorArgs([
32
                $this->templateRenderer, $this->entryParser, $this->markdownCmsConfig
33
            ])->getMockForAbstractClass();
34
    }
35
36
    public function testGetTemplateRenderer()
37
    {
38
        $this->assertSame($this->templateRenderer, $this->action->getTemplateRenderer());
39
    }
40
41
    public function testGetEntryParser()
42
    {
43
        $this->assertSame($this->entryParser, $this->action->getEntryParser());
44
    }
45
46
    public function testGetMarkdownCmsConfig()
47
    {
48
        $this->assertSame($this->markdownCmsConfig, $this->action->getMarkdownCmsConfig());
49
    }
50
}