| @@ 516-554 (lines=39) @@ | ||
| 513 | ); |
|
| 514 | } |
|
| 515 | ||
| 516 | public function testRepositoriesConfigurationStorageEmpty() |
|
| 517 | { |
|
| 518 | $repositories = array( |
|
| 519 | 'main' => array( |
|
| 520 | 'search' => array( |
|
| 521 | 'engine' => 'fantasticfind', |
|
| 522 | 'connection' => 'french', |
|
| 523 | ), |
|
| 524 | ), |
|
| 525 | ); |
|
| 526 | $expectedRepositories = array( |
|
| 527 | 'main' => array( |
|
| 528 | 'search' => array( |
|
| 529 | 'engine' => 'fantasticfind', |
|
| 530 | 'connection' => 'french', |
|
| 531 | 'config' => array(), |
|
| 532 | ), |
|
| 533 | 'storage' => array( |
|
| 534 | 'engine' => '%ezpublish.api.storage_engine.default%', |
|
| 535 | 'connection' => null, |
|
| 536 | 'config' => array(), |
|
| 537 | ), |
|
| 538 | 'fields_groups' => array( |
|
| 539 | 'list' => ['content', 'metadata'], |
|
| 540 | 'default' => '%ezsettings.default.content.field_groups.default%', |
|
| 541 | ), |
|
| 542 | 'options' => [ |
|
| 543 | 'default_version_archive_limit' => 5, |
|
| 544 | ], |
|
| 545 | ), |
|
| 546 | ); |
|
| 547 | $this->load(array('repositories' => $repositories)); |
|
| 548 | $this->assertTrue($this->container->hasParameter('ezpublish.repositories')); |
|
| 549 | ||
| 550 | $this->assertSame( |
|
| 551 | $expectedRepositories, |
|
| 552 | $this->container->getParameter('ezpublish.repositories') |
|
| 553 | ); |
|
| 554 | } |
|
| 555 | ||
| 556 | public function testRepositoriesConfigurationSearchEmpty() |
|
| 557 | { |
|
| @@ 556-594 (lines=39) @@ | ||
| 553 | ); |
|
| 554 | } |
|
| 555 | ||
| 556 | public function testRepositoriesConfigurationSearchEmpty() |
|
| 557 | { |
|
| 558 | $repositories = array( |
|
| 559 | 'main' => array( |
|
| 560 | 'storage' => array( |
|
| 561 | 'engine' => 'persistentprudence', |
|
| 562 | 'connection' => 'yes', |
|
| 563 | ), |
|
| 564 | ), |
|
| 565 | ); |
|
| 566 | $expectedRepositories = array( |
|
| 567 | 'main' => array( |
|
| 568 | 'storage' => array( |
|
| 569 | 'engine' => 'persistentprudence', |
|
| 570 | 'connection' => 'yes', |
|
| 571 | 'config' => array(), |
|
| 572 | ), |
|
| 573 | 'search' => array( |
|
| 574 | 'engine' => '%ezpublish.api.search_engine.default%', |
|
| 575 | 'connection' => null, |
|
| 576 | 'config' => array(), |
|
| 577 | ), |
|
| 578 | 'fields_groups' => array( |
|
| 579 | 'list' => ['content', 'metadata'], |
|
| 580 | 'default' => '%ezsettings.default.content.field_groups.default%', |
|
| 581 | ), |
|
| 582 | 'options' => [ |
|
| 583 | 'default_version_archive_limit' => 5, |
|
| 584 | ], |
|
| 585 | ), |
|
| 586 | ); |
|
| 587 | $this->load(array('repositories' => $repositories)); |
|
| 588 | $this->assertTrue($this->container->hasParameter('ezpublish.repositories')); |
|
| 589 | ||
| 590 | $this->assertSame( |
|
| 591 | $expectedRepositories, |
|
| 592 | $this->container->getParameter('ezpublish.repositories') |
|
| 593 | ); |
|
| 594 | } |
|
| 595 | ||
| 596 | public function testRepositoriesConfigurationCompatibility() |
|
| 597 | { |
|
| @@ 665-701 (lines=37) @@ | ||
| 662 | ); |
|
| 663 | } |
|
| 664 | ||
| 665 | public function testRepositoriesConfigurationCompatibility2() |
|
| 666 | { |
|
| 667 | $repositories = array( |
|
| 668 | 'main' => array( |
|
| 669 | 'engine' => 'legacy', |
|
| 670 | 'connection' => 'default', |
|
| 671 | ), |
|
| 672 | ); |
|
| 673 | $expectedRepositories = array( |
|
| 674 | 'main' => array( |
|
| 675 | 'storage' => array( |
|
| 676 | 'engine' => 'legacy', |
|
| 677 | 'connection' => 'default', |
|
| 678 | 'config' => array(), |
|
| 679 | ), |
|
| 680 | 'search' => array( |
|
| 681 | 'engine' => '%ezpublish.api.search_engine.default%', |
|
| 682 | 'connection' => null, |
|
| 683 | 'config' => array(), |
|
| 684 | ), |
|
| 685 | 'fields_groups' => array( |
|
| 686 | 'list' => ['content', 'metadata'], |
|
| 687 | 'default' => '%ezsettings.default.content.field_groups.default%', |
|
| 688 | ), |
|
| 689 | 'options' => [ |
|
| 690 | 'default_version_archive_limit' => 5, |
|
| 691 | ], |
|
| 692 | ), |
|
| 693 | ); |
|
| 694 | $this->load(array('repositories' => $repositories)); |
|
| 695 | $this->assertTrue($this->container->hasParameter('ezpublish.repositories')); |
|
| 696 | ||
| 697 | $this->assertSame( |
|
| 698 | $expectedRepositories, |
|
| 699 | $this->container->getParameter('ezpublish.repositories') |
|
| 700 | ); |
|
| 701 | } |
|
| 702 | ||
| 703 | public function testRelatedSiteAccesses() |
|
| 704 | { |
|