| @@ 527-565 (lines=39) @@ | ||
| 524 | ); |
|
| 525 | } |
|
| 526 | ||
| 527 | public function testRepositoriesConfigurationStorageEmpty() |
|
| 528 | { |
|
| 529 | $repositories = array( |
|
| 530 | 'main' => array( |
|
| 531 | 'search' => array( |
|
| 532 | 'engine' => 'fantasticfind', |
|
| 533 | 'connection' => 'french', |
|
| 534 | ), |
|
| 535 | ), |
|
| 536 | ); |
|
| 537 | $expectedRepositories = array( |
|
| 538 | 'main' => array( |
|
| 539 | 'search' => array( |
|
| 540 | 'engine' => 'fantasticfind', |
|
| 541 | 'connection' => 'french', |
|
| 542 | 'config' => array(), |
|
| 543 | ), |
|
| 544 | 'storage' => array( |
|
| 545 | 'engine' => '%ezpublish.api.storage_engine.default%', |
|
| 546 | 'connection' => null, |
|
| 547 | 'config' => array(), |
|
| 548 | ), |
|
| 549 | 'fields_groups' => array( |
|
| 550 | 'list' => ['content', 'metadata'], |
|
| 551 | 'default' => '%ezsettings.default.content.field_groups.default%', |
|
| 552 | ), |
|
| 553 | 'options' => [ |
|
| 554 | 'default_version_archive_limit' => 5, |
|
| 555 | ], |
|
| 556 | ), |
|
| 557 | ); |
|
| 558 | $this->load(array('repositories' => $repositories)); |
|
| 559 | $this->assertTrue($this->container->hasParameter('ezpublish.repositories')); |
|
| 560 | ||
| 561 | $this->assertSame( |
|
| 562 | $expectedRepositories, |
|
| 563 | $this->container->getParameter('ezpublish.repositories') |
|
| 564 | ); |
|
| 565 | } |
|
| 566 | ||
| 567 | public function testRepositoriesConfigurationSearchEmpty() |
|
| 568 | { |
|
| @@ 567-605 (lines=39) @@ | ||
| 564 | ); |
|
| 565 | } |
|
| 566 | ||
| 567 | public function testRepositoriesConfigurationSearchEmpty() |
|
| 568 | { |
|
| 569 | $repositories = array( |
|
| 570 | 'main' => array( |
|
| 571 | 'storage' => array( |
|
| 572 | 'engine' => 'persistentprudence', |
|
| 573 | 'connection' => 'yes', |
|
| 574 | ), |
|
| 575 | ), |
|
| 576 | ); |
|
| 577 | $expectedRepositories = array( |
|
| 578 | 'main' => array( |
|
| 579 | 'storage' => array( |
|
| 580 | 'engine' => 'persistentprudence', |
|
| 581 | 'connection' => 'yes', |
|
| 582 | 'config' => array(), |
|
| 583 | ), |
|
| 584 | 'search' => array( |
|
| 585 | 'engine' => '%ezpublish.api.search_engine.default%', |
|
| 586 | 'connection' => null, |
|
| 587 | 'config' => array(), |
|
| 588 | ), |
|
| 589 | 'fields_groups' => array( |
|
| 590 | 'list' => ['content', 'metadata'], |
|
| 591 | 'default' => '%ezsettings.default.content.field_groups.default%', |
|
| 592 | ), |
|
| 593 | 'options' => [ |
|
| 594 | 'default_version_archive_limit' => 5, |
|
| 595 | ], |
|
| 596 | ), |
|
| 597 | ); |
|
| 598 | $this->load(array('repositories' => $repositories)); |
|
| 599 | $this->assertTrue($this->container->hasParameter('ezpublish.repositories')); |
|
| 600 | ||
| 601 | $this->assertSame( |
|
| 602 | $expectedRepositories, |
|
| 603 | $this->container->getParameter('ezpublish.repositories') |
|
| 604 | ); |
|
| 605 | } |
|
| 606 | ||
| 607 | public function testRepositoriesConfigurationCompatibility() |
|
| 608 | { |
|
| @@ 676-712 (lines=37) @@ | ||
| 673 | ); |
|
| 674 | } |
|
| 675 | ||
| 676 | public function testRepositoriesConfigurationCompatibility2() |
|
| 677 | { |
|
| 678 | $repositories = array( |
|
| 679 | 'main' => array( |
|
| 680 | 'engine' => 'legacy', |
|
| 681 | 'connection' => 'default', |
|
| 682 | ), |
|
| 683 | ); |
|
| 684 | $expectedRepositories = array( |
|
| 685 | 'main' => array( |
|
| 686 | 'storage' => array( |
|
| 687 | 'engine' => 'legacy', |
|
| 688 | 'connection' => 'default', |
|
| 689 | 'config' => array(), |
|
| 690 | ), |
|
| 691 | 'search' => array( |
|
| 692 | 'engine' => '%ezpublish.api.search_engine.default%', |
|
| 693 | 'connection' => null, |
|
| 694 | 'config' => array(), |
|
| 695 | ), |
|
| 696 | 'fields_groups' => array( |
|
| 697 | 'list' => ['content', 'metadata'], |
|
| 698 | 'default' => '%ezsettings.default.content.field_groups.default%', |
|
| 699 | ), |
|
| 700 | 'options' => [ |
|
| 701 | 'default_version_archive_limit' => 5, |
|
| 702 | ], |
|
| 703 | ), |
|
| 704 | ); |
|
| 705 | $this->load(array('repositories' => $repositories)); |
|
| 706 | $this->assertTrue($this->container->hasParameter('ezpublish.repositories')); |
|
| 707 | ||
| 708 | $this->assertSame( |
|
| 709 | $expectedRepositories, |
|
| 710 | $this->container->getParameter('ezpublish.repositories') |
|
| 711 | ); |
|
| 712 | } |
|
| 713 | ||
| 714 | public function testRelatedSiteAccesses() |
|
| 715 | { |
|