| @@ 499-537 (lines=39) @@ | ||
| 496 | ); |
|
| 497 | } |
|
| 498 | ||
| 499 | public function testRepositoriesConfigurationStorageEmpty() |
|
| 500 | { |
|
| 501 | $repositories = [ |
|
| 502 | 'main' => [ |
|
| 503 | 'search' => [ |
|
| 504 | 'engine' => 'fantasticfind', |
|
| 505 | 'connection' => 'french', |
|
| 506 | ], |
|
| 507 | ], |
|
| 508 | ]; |
|
| 509 | $expectedRepositories = [ |
|
| 510 | 'main' => [ |
|
| 511 | 'search' => [ |
|
| 512 | 'engine' => 'fantasticfind', |
|
| 513 | 'connection' => 'french', |
|
| 514 | 'config' => [], |
|
| 515 | ], |
|
| 516 | 'storage' => [ |
|
| 517 | 'engine' => '%ezpublish.api.storage_engine.default%', |
|
| 518 | 'connection' => null, |
|
| 519 | 'config' => [], |
|
| 520 | ], |
|
| 521 | 'fields_groups' => [ |
|
| 522 | 'list' => ['content', 'metadata'], |
|
| 523 | 'default' => '%ezsettings.default.content.field_groups.default%', |
|
| 524 | ], |
|
| 525 | 'options' => [ |
|
| 526 | 'default_version_archive_limit' => 5, |
|
| 527 | ], |
|
| 528 | ], |
|
| 529 | ]; |
|
| 530 | $this->load(['repositories' => $repositories]); |
|
| 531 | $this->assertTrue($this->container->hasParameter('ezpublish.repositories')); |
|
| 532 | ||
| 533 | $this->assertSame( |
|
| 534 | $expectedRepositories, |
|
| 535 | $this->container->getParameter('ezpublish.repositories') |
|
| 536 | ); |
|
| 537 | } |
|
| 538 | ||
| 539 | public function testRepositoriesConfigurationSearchEmpty() |
|
| 540 | { |
|
| @@ 539-577 (lines=39) @@ | ||
| 536 | ); |
|
| 537 | } |
|
| 538 | ||
| 539 | public function testRepositoriesConfigurationSearchEmpty() |
|
| 540 | { |
|
| 541 | $repositories = [ |
|
| 542 | 'main' => [ |
|
| 543 | 'storage' => [ |
|
| 544 | 'engine' => 'persistentprudence', |
|
| 545 | 'connection' => 'yes', |
|
| 546 | ], |
|
| 547 | ], |
|
| 548 | ]; |
|
| 549 | $expectedRepositories = [ |
|
| 550 | 'main' => [ |
|
| 551 | 'storage' => [ |
|
| 552 | 'engine' => 'persistentprudence', |
|
| 553 | 'connection' => 'yes', |
|
| 554 | 'config' => [], |
|
| 555 | ], |
|
| 556 | 'search' => [ |
|
| 557 | 'engine' => '%ezpublish.api.search_engine.default%', |
|
| 558 | 'connection' => null, |
|
| 559 | 'config' => [], |
|
| 560 | ], |
|
| 561 | 'fields_groups' => [ |
|
| 562 | 'list' => ['content', 'metadata'], |
|
| 563 | 'default' => '%ezsettings.default.content.field_groups.default%', |
|
| 564 | ], |
|
| 565 | 'options' => [ |
|
| 566 | 'default_version_archive_limit' => 5, |
|
| 567 | ], |
|
| 568 | ], |
|
| 569 | ]; |
|
| 570 | $this->load(['repositories' => $repositories]); |
|
| 571 | $this->assertTrue($this->container->hasParameter('ezpublish.repositories')); |
|
| 572 | ||
| 573 | $this->assertSame( |
|
| 574 | $expectedRepositories, |
|
| 575 | $this->container->getParameter('ezpublish.repositories') |
|
| 576 | ); |
|
| 577 | } |
|
| 578 | ||
| 579 | public function testRepositoriesConfigurationCompatibility() |
|
| 580 | { |
|
| @@ 648-684 (lines=37) @@ | ||
| 645 | ); |
|
| 646 | } |
|
| 647 | ||
| 648 | public function testRepositoriesConfigurationCompatibility2() |
|
| 649 | { |
|
| 650 | $repositories = [ |
|
| 651 | 'main' => [ |
|
| 652 | 'engine' => 'legacy', |
|
| 653 | 'connection' => 'default', |
|
| 654 | ], |
|
| 655 | ]; |
|
| 656 | $expectedRepositories = [ |
|
| 657 | 'main' => [ |
|
| 658 | 'storage' => [ |
|
| 659 | 'engine' => 'legacy', |
|
| 660 | 'connection' => 'default', |
|
| 661 | 'config' => [], |
|
| 662 | ], |
|
| 663 | 'search' => [ |
|
| 664 | 'engine' => '%ezpublish.api.search_engine.default%', |
|
| 665 | 'connection' => null, |
|
| 666 | 'config' => [], |
|
| 667 | ], |
|
| 668 | 'fields_groups' => [ |
|
| 669 | 'list' => ['content', 'metadata'], |
|
| 670 | 'default' => '%ezsettings.default.content.field_groups.default%', |
|
| 671 | ], |
|
| 672 | 'options' => [ |
|
| 673 | 'default_version_archive_limit' => 5, |
|
| 674 | ], |
|
| 675 | ], |
|
| 676 | ]; |
|
| 677 | $this->load(['repositories' => $repositories]); |
|
| 678 | $this->assertTrue($this->container->hasParameter('ezpublish.repositories')); |
|
| 679 | ||
| 680 | $this->assertSame( |
|
| 681 | $expectedRepositories, |
|
| 682 | $this->container->getParameter('ezpublish.repositories') |
|
| 683 | ); |
|
| 684 | } |
|
| 685 | ||
| 686 | public function testRegisteredPolicies() |
|
| 687 | { |
|