@@ 409-426 (lines=18) @@ | ||
406 | $this->assertFalse($this->container->getDefinition('httplug.client.acme.batch_client')->isPublic()); |
|
407 | } |
|
408 | ||
409 | public function testClientCanBePublic(): void |
|
410 | { |
|
411 | $this->load([ |
|
412 | 'clients' => [ |
|
413 | 'acme' => [ |
|
414 | 'public' => true, |
|
415 | ], |
|
416 | ], |
|
417 | ]); |
|
418 | ||
419 | $this->assertContainerBuilderHasService('httplug.client.acme'); |
|
420 | $this->assertTrue($this->container->getDefinition('httplug.client.acme')->isPublic()); |
|
421 | ||
422 | if (version_compare(Kernel::VERSION, '3.4', '>=')) { |
|
423 | // Symfony made services private by default starting from 3.4 |
|
424 | $this->assertFalse($this->container->getDefinition('httplug.client.acme')->isPrivate()); |
|
425 | } |
|
426 | } |
|
427 | ||
428 | public function testFlexibleClientCanBePublic(): void |
|
429 | { |
|
@@ 428-446 (lines=19) @@ | ||
425 | } |
|
426 | } |
|
427 | ||
428 | public function testFlexibleClientCanBePublic(): void |
|
429 | { |
|
430 | $this->load([ |
|
431 | 'clients' => [ |
|
432 | 'acme' => [ |
|
433 | 'public' => true, |
|
434 | 'flexible_client' => true, |
|
435 | ], |
|
436 | ], |
|
437 | ]); |
|
438 | ||
439 | $this->assertContainerBuilderHasService('httplug.client.acme'); |
|
440 | $this->assertTrue($this->container->getDefinition('httplug.client.acme.flexible')->isPublic()); |
|
441 | ||
442 | if (version_compare(Kernel::VERSION, '3.4', '>=')) { |
|
443 | // Symfony made services private by default starting from 3.4 |
|
444 | $this->assertFalse($this->container->getDefinition('httplug.client.acme.flexible')->isPrivate()); |
|
445 | } |
|
446 | } |
|
447 | ||
448 | public function testHttpMethodsClientCanBePublic(): void |
|
449 | { |
|
@@ 448-466 (lines=19) @@ | ||
445 | } |
|
446 | } |
|
447 | ||
448 | public function testHttpMethodsClientCanBePublic(): void |
|
449 | { |
|
450 | $this->load([ |
|
451 | 'clients' => [ |
|
452 | 'acme' => [ |
|
453 | 'public' => true, |
|
454 | 'http_methods_client' => true, |
|
455 | ], |
|
456 | ], |
|
457 | ]); |
|
458 | ||
459 | $this->assertContainerBuilderHasService('httplug.client.acme'); |
|
460 | $this->assertTrue($this->container->getDefinition('httplug.client.acme.http_methods')->isPublic()); |
|
461 | ||
462 | if (version_compare(Kernel::VERSION, '3.4', '>=')) { |
|
463 | // Symfony made services private by default starting from 3.4 |
|
464 | $this->assertFalse($this->container->getDefinition('httplug.client.acme.http_methods')->isPrivate()); |
|
465 | } |
|
466 | } |
|
467 | ||
468 | public function testBatchClientCanBePublic(): void |
|
469 | { |
|
@@ 468-486 (lines=19) @@ | ||
465 | } |
|
466 | } |
|
467 | ||
468 | public function testBatchClientCanBePublic(): void |
|
469 | { |
|
470 | $this->load([ |
|
471 | 'clients' => [ |
|
472 | 'acme' => [ |
|
473 | 'public' => true, |
|
474 | 'batch_client' => true, |
|
475 | ], |
|
476 | ], |
|
477 | ]); |
|
478 | ||
479 | $this->assertContainerBuilderHasService('httplug.client.acme'); |
|
480 | $this->assertTrue($this->container->getDefinition('httplug.client.acme.batch_client')->isPublic()); |
|
481 | ||
482 | if (version_compare(Kernel::VERSION, '3.4', '>=')) { |
|
483 | // Symfony made services private by default starting from 3.4 |
|
484 | $this->assertFalse($this->container->getDefinition('httplug.client.acme.batch_client')->isPrivate()); |
|
485 | } |
|
486 | } |
|
487 | ||
488 | public function testClientIsTaggedWithHttplugClientTag(): void |
|
489 | { |