| @@ 382-417 (lines=36) @@ | ||
| 379 | ); |
|
| 380 | } |
|
| 381 | ||
| 382 | public function testRepositoriesConfigurationStorageEmpty() |
|
| 383 | { |
|
| 384 | $repositories = array( |
|
| 385 | 'main' => array( |
|
| 386 | 'search' => array( |
|
| 387 | 'engine' => 'fantasticfind', |
|
| 388 | 'connection' => 'french', |
|
| 389 | ), |
|
| 390 | ), |
|
| 391 | ); |
|
| 392 | $expectedRepositories = array( |
|
| 393 | 'main' => array( |
|
| 394 | 'search' => array( |
|
| 395 | 'engine' => 'fantasticfind', |
|
| 396 | 'connection' => 'french', |
|
| 397 | 'config' => array(), |
|
| 398 | ), |
|
| 399 | 'storage' => array( |
|
| 400 | 'engine' => '%ezpublish.api.storage_engine.default%', |
|
| 401 | 'connection' => null, |
|
| 402 | 'config' => array(), |
|
| 403 | ), |
|
| 404 | 'fields_groups' => array( |
|
| 405 | 'list' => ['content'], |
|
| 406 | 'default' => 'content', |
|
| 407 | ), |
|
| 408 | ), |
|
| 409 | ); |
|
| 410 | $this->load(array('repositories' => $repositories)); |
|
| 411 | $this->assertTrue($this->container->hasParameter('ezpublish.repositories')); |
|
| 412 | ||
| 413 | $this->assertSame( |
|
| 414 | $expectedRepositories, |
|
| 415 | $this->container->getParameter('ezpublish.repositories') |
|
| 416 | ); |
|
| 417 | } |
|
| 418 | ||
| 419 | public function testRepositoriesConfigurationSearchEmpty() |
|
| 420 | { |
|
| @@ 419-454 (lines=36) @@ | ||
| 416 | ); |
|
| 417 | } |
|
| 418 | ||
| 419 | public function testRepositoriesConfigurationSearchEmpty() |
|
| 420 | { |
|
| 421 | $repositories = array( |
|
| 422 | 'main' => array( |
|
| 423 | 'storage' => array( |
|
| 424 | 'engine' => 'persistentprudence', |
|
| 425 | 'connection' => 'yes', |
|
| 426 | ), |
|
| 427 | ), |
|
| 428 | ); |
|
| 429 | $expectedRepositories = array( |
|
| 430 | 'main' => array( |
|
| 431 | 'storage' => array( |
|
| 432 | 'engine' => 'persistentprudence', |
|
| 433 | 'connection' => 'yes', |
|
| 434 | 'config' => array(), |
|
| 435 | ), |
|
| 436 | 'search' => array( |
|
| 437 | 'engine' => '%ezpublish.api.search_engine.default%', |
|
| 438 | 'connection' => null, |
|
| 439 | 'config' => array(), |
|
| 440 | ), |
|
| 441 | 'fields_groups' => array( |
|
| 442 | 'list' => ['content'], |
|
| 443 | 'default' => 'content', |
|
| 444 | ), |
|
| 445 | ), |
|
| 446 | ); |
|
| 447 | $this->load(array('repositories' => $repositories)); |
|
| 448 | $this->assertTrue($this->container->hasParameter('ezpublish.repositories')); |
|
| 449 | ||
| 450 | $this->assertSame( |
|
| 451 | $expectedRepositories, |
|
| 452 | $this->container->getParameter('ezpublish.repositories') |
|
| 453 | ); |
|
| 454 | } |
|
| 455 | ||
| 456 | public function testRepositoriesConfigurationCompatibility() |
|
| 457 | { |
|
| @@ 519-552 (lines=34) @@ | ||
| 516 | ); |
|
| 517 | } |
|
| 518 | ||
| 519 | public function testRepositoriesConfigurationCompatibility2() |
|
| 520 | { |
|
| 521 | $repositories = array( |
|
| 522 | 'main' => array( |
|
| 523 | 'engine' => 'legacy', |
|
| 524 | 'connection' => 'default', |
|
| 525 | ), |
|
| 526 | ); |
|
| 527 | $expectedRepositories = array( |
|
| 528 | 'main' => array( |
|
| 529 | 'storage' => array( |
|
| 530 | 'engine' => 'legacy', |
|
| 531 | 'connection' => 'default', |
|
| 532 | 'config' => array(), |
|
| 533 | ), |
|
| 534 | 'search' => array( |
|
| 535 | 'engine' => '%ezpublish.api.search_engine.default%', |
|
| 536 | 'connection' => null, |
|
| 537 | 'config' => array(), |
|
| 538 | ), |
|
| 539 | 'fields_groups' => array( |
|
| 540 | 'list' => ['content'], |
|
| 541 | 'default' => 'content', |
|
| 542 | ), |
|
| 543 | ), |
|
| 544 | ); |
|
| 545 | $this->load(array('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 testRelatedSiteAccesses() |
|
| 555 | { |
|