| @@ 591-629 (lines=39) @@ | ||
| 588 | ); |
|
| 589 | } |
|
| 590 | ||
| 591 | public function testRepositoriesConfigurationStorageEmpty() |
|
| 592 | { |
|
| 593 | $repositories = [ |
|
| 594 | 'main' => [ |
|
| 595 | 'search' => [ |
|
| 596 | 'engine' => 'fantasticfind', |
|
| 597 | 'connection' => 'french', |
|
| 598 | ], |
|
| 599 | ], |
|
| 600 | ]; |
|
| 601 | $expectedRepositories = [ |
|
| 602 | 'main' => [ |
|
| 603 | 'search' => [ |
|
| 604 | 'engine' => 'fantasticfind', |
|
| 605 | 'connection' => 'french', |
|
| 606 | 'config' => [], |
|
| 607 | ], |
|
| 608 | 'storage' => [ |
|
| 609 | 'engine' => '%ezpublish.api.storage_engine.default%', |
|
| 610 | 'connection' => null, |
|
| 611 | 'config' => [], |
|
| 612 | ], |
|
| 613 | 'fields_groups' => [ |
|
| 614 | 'list' => ['content', 'metadata'], |
|
| 615 | 'default' => '%ezsettings.default.content.field_groups.default%', |
|
| 616 | ], |
|
| 617 | 'options' => [ |
|
| 618 | 'default_version_archive_limit' => 5, |
|
| 619 | ], |
|
| 620 | ], |
|
| 621 | ]; |
|
| 622 | $this->load(['repositories' => $repositories]); |
|
| 623 | $this->assertTrue($this->container->hasParameter('ezpublish.repositories')); |
|
| 624 | ||
| 625 | $this->assertSame( |
|
| 626 | $expectedRepositories, |
|
| 627 | $this->container->getParameter('ezpublish.repositories') |
|
| 628 | ); |
|
| 629 | } |
|
| 630 | ||
| 631 | public function testRepositoriesConfigurationSearchEmpty() |
|
| 632 | { |
|
| @@ 631-669 (lines=39) @@ | ||
| 628 | ); |
|
| 629 | } |
|
| 630 | ||
| 631 | public function testRepositoriesConfigurationSearchEmpty() |
|
| 632 | { |
|
| 633 | $repositories = [ |
|
| 634 | 'main' => [ |
|
| 635 | 'storage' => [ |
|
| 636 | 'engine' => 'persistentprudence', |
|
| 637 | 'connection' => 'yes', |
|
| 638 | ], |
|
| 639 | ], |
|
| 640 | ]; |
|
| 641 | $expectedRepositories = [ |
|
| 642 | 'main' => [ |
|
| 643 | 'storage' => [ |
|
| 644 | 'engine' => 'persistentprudence', |
|
| 645 | 'connection' => 'yes', |
|
| 646 | 'config' => [], |
|
| 647 | ], |
|
| 648 | 'search' => [ |
|
| 649 | 'engine' => '%ezpublish.api.search_engine.default%', |
|
| 650 | 'connection' => null, |
|
| 651 | 'config' => [], |
|
| 652 | ], |
|
| 653 | 'fields_groups' => [ |
|
| 654 | 'list' => ['content', 'metadata'], |
|
| 655 | 'default' => '%ezsettings.default.content.field_groups.default%', |
|
| 656 | ], |
|
| 657 | 'options' => [ |
|
| 658 | 'default_version_archive_limit' => 5, |
|
| 659 | ], |
|
| 660 | ], |
|
| 661 | ]; |
|
| 662 | $this->load(['repositories' => $repositories]); |
|
| 663 | $this->assertTrue($this->container->hasParameter('ezpublish.repositories')); |
|
| 664 | ||
| 665 | $this->assertSame( |
|
| 666 | $expectedRepositories, |
|
| 667 | $this->container->getParameter('ezpublish.repositories') |
|
| 668 | ); |
|
| 669 | } |
|
| 670 | ||
| 671 | public function testRepositoriesConfigurationCompatibility() |
|
| 672 | { |
|
| @@ 740-776 (lines=37) @@ | ||
| 737 | ); |
|
| 738 | } |
|
| 739 | ||
| 740 | public function testRepositoriesConfigurationCompatibility2() |
|
| 741 | { |
|
| 742 | $repositories = [ |
|
| 743 | 'main' => [ |
|
| 744 | 'engine' => 'legacy', |
|
| 745 | 'connection' => 'default', |
|
| 746 | ], |
|
| 747 | ]; |
|
| 748 | $expectedRepositories = [ |
|
| 749 | 'main' => [ |
|
| 750 | 'storage' => [ |
|
| 751 | 'engine' => 'legacy', |
|
| 752 | 'connection' => 'default', |
|
| 753 | 'config' => [], |
|
| 754 | ], |
|
| 755 | 'search' => [ |
|
| 756 | 'engine' => '%ezpublish.api.search_engine.default%', |
|
| 757 | 'connection' => null, |
|
| 758 | 'config' => [], |
|
| 759 | ], |
|
| 760 | 'fields_groups' => [ |
|
| 761 | 'list' => ['content', 'metadata'], |
|
| 762 | 'default' => '%ezsettings.default.content.field_groups.default%', |
|
| 763 | ], |
|
| 764 | 'options' => [ |
|
| 765 | 'default_version_archive_limit' => 5, |
|
| 766 | ], |
|
| 767 | ], |
|
| 768 | ]; |
|
| 769 | $this->load(['repositories' => $repositories]); |
|
| 770 | $this->assertTrue($this->container->hasParameter('ezpublish.repositories')); |
|
| 771 | ||
| 772 | $this->assertSame( |
|
| 773 | $expectedRepositories, |
|
| 774 | $this->container->getParameter('ezpublish.repositories') |
|
| 775 | ); |
|
| 776 | } |
|
| 777 | ||
| 778 | public function testRelatedSiteAccesses() |
|
| 779 | { |
|