Passed
Push — v1 ( 58ff0b...0197da )
by Andrew
06:27
created

getTests()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 4
nc 1
nop 0
dl 0
loc 7
rs 10
c 1
b 0
f 0
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) 2017 nystudio107
10
 */
11
12
/**
13
 * @author    nystudio107
14
 * @package   Seomatic
15
 * @since     3.0.0
16
 */
17
class Twig_Tests_Node_Expression_EmptyCoalesceTest extends Twig_Test_NodeTestCase
18
{
19
    public function getTests()
20
    {
21
        $left = new Twig_Node_Expression_Name('foo', 1);
22
        $right = new Twig_Node_Expression_Constant(2, 1);
23
        $node = new Twig_Node_Expression_EmptyCoalesce($left, $right, 1);
24
25
        return array(array($node, "((// line 1\n\$context[\"foo\"]) ?? (2))"));
26
    }
27
}
28