Code Duplication    Length = 21-21 lines in 3 locations

tests/MetadataManagerTest.php 3 locations

@@ 536-556 (lines=21) @@
533
        $this->assertNull($result->getDocumentation());
534
    }
535
536
    public function testMalformedMultiplicity()
537
    {
538
        list(, $metadataManager, $CategoryType, $CustomerType) = $this->setUpMetadataForNavTests();
539
540
        $expected = 'Malformed multiplicity - valid values are *, 0..1 and 1';
541
        $actual = null;
542
543
        try {
544
            $metadataManager->addNavigationPropertyToEntityType(
545
                $CategoryType,
546
                '1',
547
                'Customers',
548
                $CustomerType,
549
                'ABC',
550
                'Categories'
551
            );
552
        } catch (\InvalidArgumentException $e) {
553
            $actual = $e->getMessage();
554
        }
555
        $this->assertEquals($expected, $actual);
556
    }
557
558
    public function testInvalidMultiplicityBelongsOnBothEnds()
559
    {
@@ 558-578 (lines=21) @@
555
        $this->assertEquals($expected, $actual);
556
    }
557
558
    public function testInvalidMultiplicityBelongsOnBothEnds()
559
    {
560
        list(, $metadataManager, $CategoryType, $CustomerType) = $this->setUpMetadataForNavTests();
561
562
        $expected =  'Invalid multiplicity combination - 1 1';
563
        $actual = null;
564
565
        try {
566
            $metadataManager->addNavigationPropertyToEntityType(
567
                $CategoryType,
568
                '1',
569
                'Customers',
570
                $CustomerType,
571
                '1',
572
                'Categories'
573
            );
574
        } catch (\InvalidArgumentException $e) {
575
            $actual = $e->getMessage();
576
        }
577
        $this->assertEquals($expected, $actual);
578
    }
579
580
    public function testInvalidMultiplicityManyToHasMany()
581
    {
@@ 580-600 (lines=21) @@
577
        $this->assertEquals($expected, $actual);
578
    }
579
580
    public function testInvalidMultiplicityManyToHasMany()
581
    {
582
        list(, $metadataManager, $CategoryType, $CustomerType) = $this->setUpMetadataForNavTests();
583
584
        $expected =  'Invalid multiplicity combination - * 0..1';
585
        $actual = null;
586
587
        try {
588
            $metadataManager->addNavigationPropertyToEntityType(
589
                $CategoryType,
590
                '*',
591
                'Customers',
592
                $CustomerType,
593
                '0..1',
594
                'Categories'
595
            );
596
        } catch (\InvalidArgumentException $e) {
597
            $actual = $e->getMessage();
598
        }
599
        $this->assertEquals($expected, $actual);
600
    }
601
602
    public function testAddComplexType()
603
    {