Code Duplication    Length = 33-33 lines in 3 locations

tests/MetadataManagerTest.php 3 locations

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