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