@@ 653-670 (lines=18) @@ | ||
650 | $this->assertNull($result->getDocumentation()); |
|
651 | } |
|
652 | ||
653 | public function testAddPropertyToComplexTypeDefaultValueArray() |
|
654 | { |
|
655 | $expected = "Default value cannot be object or array"; |
|
656 | $actual = null; |
|
657 | ||
658 | list(, $metadataManager, , ) = $this->setUpMetadataForNavTests(); |
|
659 | $complex = m::mock(TComplexTypeType::class); |
|
660 | $name = "name"; |
|
661 | $type = "type"; |
|
662 | $defaultValue = []; |
|
663 | ||
664 | try { |
|
665 | $metadataManager->addPropertyToComplexType($complex, $name, $type, $defaultValue); |
|
666 | } catch (\InvalidArgumentException $e) { |
|
667 | $actual = $e->getMessage(); |
|
668 | } |
|
669 | $this->assertEquals($expected, $actual); |
|
670 | } |
|
671 | ||
672 | public function testAddPropertyToComplexTypeDefaultValueObject() |
|
673 | { |
|
@@ 672-689 (lines=18) @@ | ||
669 | $this->assertEquals($expected, $actual); |
|
670 | } |
|
671 | ||
672 | public function testAddPropertyToComplexTypeDefaultValueObject() |
|
673 | { |
|
674 | $expected = "Default value cannot be object or array"; |
|
675 | $actual = null; |
|
676 | ||
677 | list(, $metadataManager, , ) = $this->setUpMetadataForNavTests(); |
|
678 | $complex = m::mock(TComplexTypeType::class); |
|
679 | $name = "name"; |
|
680 | $type = "type"; |
|
681 | $defaultValue = new \stdClass(); |
|
682 | ||
683 | try { |
|
684 | $metadataManager->addPropertyToComplexType($complex, $name, $type, $defaultValue); |
|
685 | } catch (\InvalidArgumentException $e) { |
|
686 | $actual = $e->getMessage(); |
|
687 | } |
|
688 | $this->assertEquals($expected, $actual); |
|
689 | } |
|
690 | ||
691 | public function testAddPropertyToComplexTypeDefaultValueBoolean() |
|
692 | { |