| @@ 942-974 (lines=33) @@ | ||
| 939 | $this->assertNull($result->getDocumentation()); |
|
| 940 | } |
|
| 941 | ||
| 942 | public function testAddNavigationPropertyToEntityTypeWithDocumentation() |
|
| 943 | { |
|
| 944 | list(, $metadataManager, $categoryType, $customerType) = $this->setUpMetadataForNavTests(); |
|
| 945 | ||
| 946 | $summary = new TTextType(); |
|
| 947 | $longDescription = new TTextType(); |
|
| 948 | $mult = '*'; |
|
| 949 | $principalProperty = 'Categories'; |
|
| 950 | $dependentProperty = 'Customers'; |
|
| 951 | ||
| 952 | list($principal, $dependent) = $metadataManager |
|
| 953 | ->addNavigationPropertyToEntityType( |
|
| 954 | $categoryType, |
|
| 955 | $mult, |
|
| 956 | $principalProperty, |
|
| 957 | $customerType, |
|
| 958 | $mult, |
|
| 959 | $dependentProperty, |
|
| 960 | null, |
|
| 961 | null, |
|
| 962 | 'Public', |
|
| 963 | 'Public', |
|
| 964 | 'Public', |
|
| 965 | 'Public', |
|
| 966 | $summary, |
|
| 967 | $longDescription, |
|
| 968 | $summary, |
|
| 969 | $longDescription |
|
| 970 | ); |
|
| 971 | ||
| 972 | $this->assertNotNull($principal->getDocumentation()); |
|
| 973 | $this->assertNotNull($dependent->getDocumentation()); |
|
| 974 | } |
|
| 975 | ||
| 976 | public function testAddNavigationPropertyToEntityTypeWithDocumentationWithOnlySummary() |
|
| 977 | { |
|
| @@ 976-1008 (lines=33) @@ | ||
| 973 | $this->assertNotNull($dependent->getDocumentation()); |
|
| 974 | } |
|
| 975 | ||
| 976 | public function testAddNavigationPropertyToEntityTypeWithDocumentationWithOnlySummary() |
|
| 977 | { |
|
| 978 | list(, $metadataManager, $categoryType, $customerType) = $this->setUpMetadataForNavTests(); |
|
| 979 | ||
| 980 | $summary = null; |
|
| 981 | $longDescription = new TTextType(); |
|
| 982 | $mult = '*'; |
|
| 983 | $principalProperty = 'Categories'; |
|
| 984 | $dependentProperty = 'Customers'; |
|
| 985 | ||
| 986 | list($principal, $dependent) = $metadataManager |
|
| 987 | ->addNavigationPropertyToEntityType( |
|
| 988 | $categoryType, |
|
| 989 | $mult, |
|
| 990 | $principalProperty, |
|
| 991 | $customerType, |
|
| 992 | $mult, |
|
| 993 | $dependentProperty, |
|
| 994 | null, |
|
| 995 | null, |
|
| 996 | 'Public', |
|
| 997 | 'Public', |
|
| 998 | 'Public', |
|
| 999 | 'Public', |
|
| 1000 | $summary, |
|
| 1001 | $longDescription, |
|
| 1002 | $summary, |
|
| 1003 | $longDescription |
|
| 1004 | ); |
|
| 1005 | ||
| 1006 | $this->assertNull($principal->getDocumentation()); |
|
| 1007 | $this->assertNull($dependent->getDocumentation()); |
|
| 1008 | } |
|
| 1009 | ||
| 1010 | public function testAddNavigationPropertyToEntityTypeWithDocumentationWithOnlyDescription() |
|
| 1011 | { |
|
| @@ 1010-1042 (lines=33) @@ | ||
| 1007 | $this->assertNull($dependent->getDocumentation()); |
|
| 1008 | } |
|
| 1009 | ||
| 1010 | public function testAddNavigationPropertyToEntityTypeWithDocumentationWithOnlyDescription() |
|
| 1011 | { |
|
| 1012 | list(, $metadataManager, $categoryType, $customerType) = $this->setUpMetadataForNavTests(); |
|
| 1013 | ||
| 1014 | $summary = new TTextType(); |
|
| 1015 | $longDescription = null; |
|
| 1016 | $mult = '*'; |
|
| 1017 | $principalProperty = 'Categories'; |
|
| 1018 | $dependentProperty = 'Customers'; |
|
| 1019 | ||
| 1020 | list($principal, $dependent) = $metadataManager |
|
| 1021 | ->addNavigationPropertyToEntityType( |
|
| 1022 | $categoryType, |
|
| 1023 | $mult, |
|
| 1024 | $principalProperty, |
|
| 1025 | $customerType, |
|
| 1026 | $mult, |
|
| 1027 | $dependentProperty, |
|
| 1028 | null, |
|
| 1029 | null, |
|
| 1030 | 'Public', |
|
| 1031 | 'Public', |
|
| 1032 | 'Public', |
|
| 1033 | 'Public', |
|
| 1034 | $summary, |
|
| 1035 | $longDescription, |
|
| 1036 | $summary, |
|
| 1037 | $longDescription |
|
| 1038 | ); |
|
| 1039 | ||
| 1040 | $this->assertNull($principal->getDocumentation()); |
|
| 1041 | $this->assertNull($dependent->getDocumentation()); |
|
| 1042 | } |
|
| 1043 | ||
| 1044 | public function testCreateAssociationFromNavigationPropertyRelationMismatch() |
|
| 1045 | { |
|