Code Duplication    Length = 14-18 lines in 2 locations

tests/LuaToPhpConverterTest.php 2 locations

@@ 41-54 (lines=14) @@
38
        $this->assertEquals(null, LuaToPhpConverter::convertToPhpValue($node));
39
    }
40
41
    public function testSimpleTable() {
42
        $parser = new LuaParser(new LuaTokenStream(new LuaInputStream('{ foo = "bar" }')));
43
44
        $node = $parser->parse();
45
46
        $result = LuaToPhpConverter::convertToPhpValue($node);
47
48
        $this->assertEquals(
49
            [
50
                'foo' => 'bar',
51
            ],
52
            $result
53
        );
54
    }
55
56
    public function testNestedTable() {
57
        $parser = new LuaParser(new LuaTokenStream(new LuaInputStream('{ foo = { "bar" = { 1337 } } }')));
@@ 56-73 (lines=18) @@
53
        );
54
    }
55
56
    public function testNestedTable() {
57
        $parser = new LuaParser(new LuaTokenStream(new LuaInputStream('{ foo = { "bar" = { 1337 } } }')));
58
59
        $node = $parser->parse();
60
61
        $result = LuaToPhpConverter::convertToPhpValue($node);
62
63
        $this->assertEquals(
64
            [
65
                'foo' => [
66
                    'bar' => [
67
                        1337,
68
                    ],
69
                ],
70
            ],
71
            $result
72
        );
73
    }
74
75
    public function testEmptyTable() {
76
        $parser = new LuaParser(new LuaTokenStream(new LuaInputStream('{}')));