@@ 290-302 (lines=13) @@ | ||
287 | $this->assertEquals($expected, $actual); |
|
288 | } |
|
289 | ||
290 | public function testAddGoodParameter() |
|
291 | { |
|
292 | $function = m::mock(TFunctionImportParameterType::class); |
|
293 | $function->shouldReceive('isOK')->andReturn(true)->once(); |
|
294 | ||
295 | $foo = new FunctionImportAnonymousType(); |
|
296 | $foo->addToParameter($function); |
|
297 | $this->assertTrue($foo->issetParameter(0)); |
|
298 | $this->assertFalse($foo->issetParameter(1)); |
|
299 | $this->assertEquals(1, count($foo->getParameter())); |
|
300 | $foo->unsetParameter(0); |
|
301 | $this->assertEquals(0, count($foo->getParameter())); |
|
302 | } |
|
303 | ||
304 | public function testSetBadParameterArray() |
|
305 | { |
@@ 45-58 (lines=14) @@ | ||
42 | $this->assertEquals($expected, $actual); |
|
43 | } |
|
44 | ||
45 | public function testAddToOnDeleteGoodData() |
|
46 | { |
|
47 | $foo = new TAssociationEndType(); |
|
48 | $onDelete = m::mock(TOnActionType::class)->makePartial(); |
|
49 | $onDelete->shouldReceive('isOK')->andReturn(true)->once(); |
|
50 | ||
51 | $foo->addToOnDelete($onDelete); |
|
52 | $this->assertTrue($foo->issetOnDelete(0)); |
|
53 | $this->assertFalse($foo->issetOnDelete(1)); |
|
54 | ||
55 | $foo->unsetOnDelete(0); |
|
56 | $this->assertFalse($foo->issetOnDelete(0)); |
|
57 | $this->assertFalse($foo->issetOnDelete(1)); |
|
58 | } |
|
59 | ||
60 | public function testSetOnDeleteBadItem() |
|
61 | { |