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