Code Duplication    Length = 33-33 lines in 3 locations

tests/MetadataManagerTest.php 3 locations

@@ 902-934 (lines=33) @@
899
        $this->assertNull($result->getDocumentation());
900
    }
901
902
    public function testAddNavigationPropertyToEntityTypeWithDocumentation()
903
    {
904
        list(, $metadataManager, $CategoryType, $CustomerType) = $this->setUpMetadataForNavTests();
905
906
        $summary = new TTextType();
907
        $longDescription = new TTextType();
908
        $mult = '*';
909
        $principalProperty = 'Categories';
910
        $dependentProperty = 'Customers';
911
912
        list($principal, $dependent) = $metadataManager
913
            ->addNavigationPropertyToEntityType(
914
                $CategoryType,
915
                $mult,
916
                $principalProperty,
917
                $CustomerType,
918
                $mult,
919
                $dependentProperty,
920
                null,
921
                null,
922
                'Public',
923
                'Public',
924
                'Public',
925
                'Public',
926
                $summary,
927
                $longDescription,
928
                $summary,
929
                $longDescription
930
            );
931
932
        $this->assertNotNull($principal->getDocumentation());
933
        $this->assertNotNull($dependent->getDocumentation());
934
    }
935
936
    public function testAddNavigationPropertyToEntityTypeWithDocumentationWithOnlySummary()
937
    {
@@ 936-968 (lines=33) @@
933
        $this->assertNotNull($dependent->getDocumentation());
934
    }
935
936
    public function testAddNavigationPropertyToEntityTypeWithDocumentationWithOnlySummary()
937
    {
938
        list(, $metadataManager, $CategoryType, $CustomerType) = $this->setUpMetadataForNavTests();
939
940
        $summary = null;
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->assertNull($principal->getDocumentation());
967
        $this->assertNull($dependent->getDocumentation());
968
    }
969
970
    public function testAddNavigationPropertyToEntityTypeWithDocumentationWithOnlyDescription()
971
    {
@@ 970-1002 (lines=33) @@
967
        $this->assertNull($dependent->getDocumentation());
968
    }
969
970
    public function testAddNavigationPropertyToEntityTypeWithDocumentationWithOnlyDescription()
971
    {
972
        list(, $metadataManager, $CategoryType, $CustomerType) = $this->setUpMetadataForNavTests();
973
974
        $summary = new TTextType();
975
        $longDescription = null;
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 testCreateAssociationFromNavigationPropertyRelationMismatch()
1005
    {