| @@ 548-586 (lines=39) @@ | ||
| 545 | ); |
|
| 546 | } |
|
| 547 | ||
| 548 | public function testRepositoriesConfigurationStorageEmpty() |
|
| 549 | { |
|
| 550 | $repositories = array( |
|
| 551 | 'main' => array( |
|
| 552 | 'search' => array( |
|
| 553 | 'engine' => 'fantasticfind', |
|
| 554 | 'connection' => 'french', |
|
| 555 | ), |
|
| 556 | ), |
|
| 557 | ); |
|
| 558 | $expectedRepositories = array( |
|
| 559 | 'main' => array( |
|
| 560 | 'search' => array( |
|
| 561 | 'engine' => 'fantasticfind', |
|
| 562 | 'connection' => 'french', |
|
| 563 | 'config' => array(), |
|
| 564 | ), |
|
| 565 | 'storage' => array( |
|
| 566 | 'engine' => '%ezpublish.api.storage_engine.default%', |
|
| 567 | 'connection' => null, |
|
| 568 | 'config' => array(), |
|
| 569 | ), |
|
| 570 | 'fields_groups' => array( |
|
| 571 | 'list' => ['content', 'metadata'], |
|
| 572 | 'default' => '%ezsettings.default.content.field_groups.default%', |
|
| 573 | ), |
|
| 574 | 'options' => [ |
|
| 575 | 'default_version_archive_limit' => 5, |
|
| 576 | ], |
|
| 577 | ), |
|
| 578 | ); |
|
| 579 | $this->load(array('repositories' => $repositories)); |
|
| 580 | $this->assertTrue($this->container->hasParameter('ezpublish.repositories')); |
|
| 581 | ||
| 582 | $this->assertSame( |
|
| 583 | $expectedRepositories, |
|
| 584 | $this->container->getParameter('ezpublish.repositories') |
|
| 585 | ); |
|
| 586 | } |
|
| 587 | ||
| 588 | public function testRepositoriesConfigurationSearchEmpty() |
|
| 589 | { |
|
| @@ 588-626 (lines=39) @@ | ||
| 585 | ); |
|
| 586 | } |
|
| 587 | ||
| 588 | public function testRepositoriesConfigurationSearchEmpty() |
|
| 589 | { |
|
| 590 | $repositories = array( |
|
| 591 | 'main' => array( |
|
| 592 | 'storage' => array( |
|
| 593 | 'engine' => 'persistentprudence', |
|
| 594 | 'connection' => 'yes', |
|
| 595 | ), |
|
| 596 | ), |
|
| 597 | ); |
|
| 598 | $expectedRepositories = array( |
|
| 599 | 'main' => array( |
|
| 600 | 'storage' => array( |
|
| 601 | 'engine' => 'persistentprudence', |
|
| 602 | 'connection' => 'yes', |
|
| 603 | 'config' => array(), |
|
| 604 | ), |
|
| 605 | 'search' => array( |
|
| 606 | 'engine' => '%ezpublish.api.search_engine.default%', |
|
| 607 | 'connection' => null, |
|
| 608 | 'config' => array(), |
|
| 609 | ), |
|
| 610 | 'fields_groups' => array( |
|
| 611 | 'list' => ['content', 'metadata'], |
|
| 612 | 'default' => '%ezsettings.default.content.field_groups.default%', |
|
| 613 | ), |
|
| 614 | 'options' => [ |
|
| 615 | 'default_version_archive_limit' => 5, |
|
| 616 | ], |
|
| 617 | ), |
|
| 618 | ); |
|
| 619 | $this->load(array('repositories' => $repositories)); |
|
| 620 | $this->assertTrue($this->container->hasParameter('ezpublish.repositories')); |
|
| 621 | ||
| 622 | $this->assertSame( |
|
| 623 | $expectedRepositories, |
|
| 624 | $this->container->getParameter('ezpublish.repositories') |
|
| 625 | ); |
|
| 626 | } |
|
| 627 | ||
| 628 | public function testRepositoriesConfigurationCompatibility() |
|
| 629 | { |
|
| @@ 697-733 (lines=37) @@ | ||
| 694 | ); |
|
| 695 | } |
|
| 696 | ||
| 697 | public function testRepositoriesConfigurationCompatibility2() |
|
| 698 | { |
|
| 699 | $repositories = array( |
|
| 700 | 'main' => array( |
|
| 701 | 'engine' => 'legacy', |
|
| 702 | 'connection' => 'default', |
|
| 703 | ), |
|
| 704 | ); |
|
| 705 | $expectedRepositories = array( |
|
| 706 | 'main' => array( |
|
| 707 | 'storage' => array( |
|
| 708 | 'engine' => 'legacy', |
|
| 709 | 'connection' => 'default', |
|
| 710 | 'config' => array(), |
|
| 711 | ), |
|
| 712 | 'search' => array( |
|
| 713 | 'engine' => '%ezpublish.api.search_engine.default%', |
|
| 714 | 'connection' => null, |
|
| 715 | 'config' => array(), |
|
| 716 | ), |
|
| 717 | 'fields_groups' => array( |
|
| 718 | 'list' => ['content', 'metadata'], |
|
| 719 | 'default' => '%ezsettings.default.content.field_groups.default%', |
|
| 720 | ), |
|
| 721 | 'options' => [ |
|
| 722 | 'default_version_archive_limit' => 5, |
|
| 723 | ], |
|
| 724 | ), |
|
| 725 | ); |
|
| 726 | $this->load(array('repositories' => $repositories)); |
|
| 727 | $this->assertTrue($this->container->hasParameter('ezpublish.repositories')); |
|
| 728 | ||
| 729 | $this->assertSame( |
|
| 730 | $expectedRepositories, |
|
| 731 | $this->container->getParameter('ezpublish.repositories') |
|
| 732 | ); |
|
| 733 | } |
|
| 734 | ||
| 735 | public function testRelatedSiteAccesses() |
|
| 736 | { |
|