@@ 78-89 (lines=12) @@ | ||
75 | $this->assertEquals($expected, $actual); |
|
76 | } |
|
77 | ||
78 | public function testAddGoodEnd() |
|
79 | { |
|
80 | $end = m::mock(EndAnonymousType::class); |
|
81 | $end->shouldReceive('isOK')->andReturn(true); |
|
82 | ||
83 | $foo = new AssociationSetAnonymousType(); |
|
84 | ||
85 | $foo->addToEnd($end); |
|
86 | $this->assertTrue($foo->issetEnd(0)); |
|
87 | $foo->unsetEnd(0); |
|
88 | $this->assertFalse($foo->issetEnd(0)); |
|
89 | } |
|
90 | ||
91 | public function testIsOKNewObject() |
|
92 | { |
@@ 146-157 (lines=12) @@ | ||
143 | $this->assertEquals($expected, $actual); |
|
144 | } |
|
145 | ||
146 | public function testAddGoodTypeAnnotation() |
|
147 | { |
|
148 | $type = m::mock(TTypeAnnotationType::class)->makePartial(); |
|
149 | $type->shouldReceive('isOK')->andReturn(true); |
|
150 | ||
151 | $foo = new EntitySetAnonymousType(); |
|
152 | ||
153 | $foo->addToTypeAnnotation($type); |
|
154 | $this->assertTrue($foo->issetTypeAnnotation(0)); |
|
155 | $foo->unsetTypeAnnotation(0); |
|
156 | $this->assertFalse($foo->issetTypeAnnotation(0)); |
|
157 | } |
|
158 | ||
159 | public function testAddBadDocumentation() |
|
160 | { |
|
@@ 177-188 (lines=12) @@ | ||
174 | $this->assertEquals($expected, $actual); |
|
175 | } |
|
176 | ||
177 | public function testAddGoodDocumentation() |
|
178 | { |
|
179 | $doc = m::mock(TDocumentationType::class); |
|
180 | $doc->shouldReceive('isOK')->andReturn(true); |
|
181 | ||
182 | $foo = new EntitySetAnonymousType(); |
|
183 | ||
184 | $foo->addToDocumentation($doc); |
|
185 | $this->assertTrue($foo->issetDocumentation(0)); |
|
186 | $foo->unsetDocumentation(0); |
|
187 | $this->assertFalse($foo->issetDocumentation(0)); |
|
188 | } |
|
189 | ||
190 | public function testSetBadDocumentation() |
|
191 | { |
|
@@ 244-255 (lines=12) @@ | ||
241 | $this->assertEquals($expected, $actual); |
|
242 | } |
|
243 | ||
244 | public function testAddGoodValueAnnotation() |
|
245 | { |
|
246 | $type = m::mock(TValueAnnotationType::class)->makePartial(); |
|
247 | $type->shouldReceive('isOK')->andReturn(true); |
|
248 | ||
249 | $foo = new EntitySetAnonymousType(); |
|
250 | ||
251 | $foo->addToValueAnnotation($type); |
|
252 | $this->assertTrue($foo->issetValueAnnotation(0)); |
|
253 | $foo->unsetValueAnnotation(0); |
|
254 | $this->assertFalse($foo->issetValueAnnotation(0)); |
|
255 | } |
|
256 | ||
257 | public function testIsOkTooManyDocumentation() |
|
258 | { |