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