Completed
Push — master ( fd2b77...b3b6d3 )
by Andrii
01:58
created

ReadmeTest::testMinimal()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 5

Duplication

Lines 7
Ratio 100 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 7
loc 7
rs 9.4285
cc 1
eloc 5
nc 1
nop 0
1
<?php
2
3
/*
4
 * README plugin for HiDev
5
 *
6
 * @link      https://github.com/hiqdev/hidev-readme
7
 * @package   hidev-readme
8
 * @license   BSD-3-Clause
9
 * @copyright Copyright (c) 2015-2016, HiQDev (http://hiqdev.com/)
10
 */
11
12
namespace hidev\readme\tests\functinal;
13
14
use hidev\tests\functional\Tester;
15
16
class ReadmeTest extends \PHPUnit_Framework_TestCase
17
{
18
    /**
19
     * @var Tester
20
     */
21
    protected $tester;
22
23
    protected function setUp()
24
    {
25
        $this->tester = new Tester($this);
26
    }
27
28
    protected function tearDown()
29
    {
30
        $this->tester = null;
31
    }
32
33
    /**
34
     * Test minimal.
35
     */
36 View Code Duplication
    public function testMinimal()
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...
37
    {
38
        $dir = __DIR__ . DIRECTORY_SEPARATOR . 'minimal';
39
        $this->tester->config($dir . '/.hidev/config.yml');
40
        $this->tester->hidev('README.md');
41
        $this->tester->assertFiles($dir, ['.']);
42
    }
43
44
    /**
45
     * Test options.
46
     */
47 View Code Duplication
    public function testMore()
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...
48
    {
49
        $dir = __DIR__ . DIRECTORY_SEPARATOR . 'more';
50
        $this->tester->config($dir . '/.hidev/config.yml');
51
        $this->tester->hidev('README.md');
52
        $this->tester->assertFiles($dir, ['.']);
53
    }
54
55
    /**
56
     * Test docs/readme.
57
     */
58
    public function testDocs()
59
    {
60
        $dir = __DIR__ . DIRECTORY_SEPARATOR . 'docs';
61
        $this->tester->config($dir . '/.hidev/config.yml');
62
        $this->tester->writeFile('docs/readme/Usage.md', $dir);
63
        $this->tester->writeFile('docs/readme/Installation.md', $dir);
64
        $this->tester->hidev('README.md');
65
        $this->tester->assertFiles($dir, ['.']);
66
    }
67
}
68