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