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