Code Duplication    Length = 14-14 lines in 4 locations

tests/WSDL/Parser/NodeTest.php 4 locations

@@ 54-67 (lines=14) @@
51
    /**
52
     * @test
53
     */
54
    public function shouldGetTypeForObjectType()
55
    {
56
        //given
57
        $elements = [
58
            new Node('string', '$name', false)
59
        ];
60
        $node = new Node('object', '$user', false, $elements);
61
62
        //when
63
        $type = $node->getType();
64
65
        //then
66
        $this->assertEquals('object', $type);
67
    }
68
69
    /**
70
     * @test
@@ 117-130 (lines=14) @@
114
    /**
115
     * @test
116
     */
117
    public function shouldGetNameForObject()
118
    {
119
        //given
120
        $elements = [
121
            new Node('string', '$name', false)
122
        ];
123
        $node = new Node('object', '$user', false, $elements);
124
125
        //when
126
        $name = $node->getNameForObject();
127
128
        //then
129
        $this->assertEquals('User', $name);
130
    }
131
132
    /**
133
     * @test
@@ 135-148 (lines=14) @@
132
    /**
133
     * @test
134
     */
135
    public function shouldSingularizeeNameForObject()
136
    {
137
        //given
138
        $elements = [
139
            new Node('string', '$name', false)
140
        ];
141
        $node = new Node('object', '$users', true, $elements);
142
143
        //when
144
        $name = $node->getNameForObject();
145
146
        //then
147
        $this->assertEquals('User', $name);
148
    }
149
150
    /**
151
     * @test
@@ 198-211 (lines=14) @@
195
    /**
196
     * @test
197
     */
198
    public function shouldReturnTrueWhenTypeIsObject()
199
    {
200
        //given
201
        $elements = [
202
            new Node('string', '$name', false)
203
        ];
204
        $node = new Node('object', '$users', true, $elements);
205
206
        //when
207
        $isArray = $node->isObject();
208
209
        //then
210
        $this->assertTrue($isArray);
211
    }
212
}
213