Passed
Push — master ( c1ea42...932af5 )
by David
43s
created

DoctrineAnnotationDumperTest::testExportValues()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 8
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace TheCodingMachine\FluidSchema;
4
5
use PHPUnit\Framework\TestCase;
6
7
class DoctrineAnnotationDumperTest extends TestCase
8
{
9
10
    public function testExportValues()
11
    {
12
        $this->assertSame('', DoctrineAnnotationDumper::exportValues(null));
13
        $this->assertSame('({})', DoctrineAnnotationDumper::exportValues([]));
14
        $this->assertSame('("foo")', DoctrineAnnotationDumper::exportValues("foo"));
15
        $this->assertSame('(foo = "bar")', DoctrineAnnotationDumper::exportValues(["foo"=>"bar"]));
16
        $this->assertSame('(foo = {"bar":"baz", "baz":"bar"})', DoctrineAnnotationDumper::exportValues(["foo"=>["bar"=>"baz","baz"=>"bar"]]));
17
    }
18
}
19