Code Duplication    Length = 8-12 lines in 5 locations

Tests/Library/Type/EnumTypeTest.php 4 locations

@@ 42-51 (lines=10) @@
39
    /**
40
     * @expectedException Youshido\GraphQL\Exception\ConfigurationException
41
     */
42
    public function testInvalidValueParams()
43
    {
44
        $enumField = new EnumType([
45
            'values' => [
46
                'test'  => 'asd',
47
                'value' => 'asdasd'
48
            ]
49
        ]);
50
        ConfigValidator::getInstance()->assertValidConfig($enumField->getConfig());
51
    }
52
53
    /**
54
     * @expectedException Youshido\GraphQL\Exception\ConfigurationException
@@ 56-67 (lines=12) @@
53
    /**
54
     * @expectedException Youshido\GraphQL\Exception\ConfigurationException
55
     */
56
    public function testExistingNameParams()
57
    {
58
        $enumField = new EnumType([
59
            'values' => [
60
                [
61
                    'test'  => 'asd',
62
                    'value' => 'asdasd'
63
                ]
64
            ]
65
        ]);
66
        ConfigValidator::getInstance()->assertValidConfig($enumField->getConfig());
67
    }
68
69
    /**
70
     * @expectedException Youshido\GraphQL\Exception\ConfigurationException
@@ 72-83 (lines=12) @@
69
    /**
70
     * @expectedException Youshido\GraphQL\Exception\ConfigurationException
71
     */
72
    public function testInvalidNameParams()
73
    {
74
        $enumField = new EnumType([
75
            'values' => [
76
                [
77
                    'name'  => false,
78
                    'value' => 'asdasd'
79
                ]
80
            ]
81
        ]);
82
        ConfigValidator::getInstance()->assertValidConfig($enumField->getConfig());
83
    }
84
85
    /**
86
     * @expectedException Youshido\GraphQL\Exception\ConfigurationException
@@ 88-98 (lines=11) @@
85
    /**
86
     * @expectedException Youshido\GraphQL\Exception\ConfigurationException
87
     */
88
    public function testWithoutValueParams()
89
    {
90
        $enumField = new EnumType([
91
            'values' => [
92
                [
93
                    'name' => 'TEST_ENUM',
94
                ]
95
            ]
96
        ]);
97
        ConfigValidator::getInstance()->assertValidConfig($enumField->getConfig());
98
    }
99
100
    public function testNormalCreatingParams()
101
    {

Tests/Library/Type/ObjectTypeTest.php 1 location

@@ 46-53 (lines=8) @@
43
    /**
44
     * @expectedException Youshido\GraphQL\Exception\ConfigurationException
45
     */
46
    public function testInvalidFieldsParam()
47
    {
48
        $type = new ObjectType([
49
            'name'   => 'SomeName',
50
            'fields' => []
51
        ]);
52
        ConfigValidator::getInstance()->assertValidConfig($type->getConfig());
53
    }
54
55
    /**
56
     * @expectedException \InvalidArgumentException