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