Test Failed
Branch develop (8017af)
by Andrew
11:49
created

ExampleUnitTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 37
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 9
dl 0
loc 37
rs 10
c 1
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A testCraftEdition() 0 7 1
A testPluginInstance() 0 5 1
1
<?php
2
/**
3
 * SEOmatic plugin for Craft CMS 3.x
4
 *
5
 * A turnkey SEO implementation for Craft CMS that is comprehensive, powerful,
6
 * and flexible
7
 *
8
 * @link      https://nystudio107.com
9
 * @copyright Copyright (c) 2020 nystudio107
10
 */
11
12
namespace nystudio107\seomatictests\unit;
13
14
use Codeception\Test\Unit;
15
use UnitTester;
16
use Craft;
17
use nystudio107\seomatic\Seomatic;
18
19
/**
20
 * ExampleUnitTest
21
 *
22
 * @author    nystudio107
23
 * @package   Seomatic
24
 * @since     3.3.9
25
 */
26
class ExampleUnitTest extends Unit
27
{
28
    // Properties
29
    // =========================================================================
30
31
    /**
32
     * @var UnitTester
33
     */
34
    protected $tester;
35
36
    // Public methods
37
    // =========================================================================
38
39
    // Tests
40
    // =========================================================================
41
42
    /**
43
     *
44
     */
45
    public function testPluginInstance()
46
    {
47
        $this->assertInstanceOf(
48
            Seomatic::class,
49
            Seomatic::$plugin
50
        );
51
    }
52
53
    /**
54
     *
55
     */
56
    public function testCraftEdition()
57
    {
58
        Craft::$app->setEdition(Craft::Pro);
59
60
        $this->assertSame(
61
            Craft::Pro,
62
            Craft::$app->getEdition()
63
        );
64
    }
65
}
66