| @@ 376-393 (lines=18) @@ | ||
| 373 | $this->assertFalse($this->container->getDefinition('httplug.client.acme.batch_client')->isPublic()); |
|
| 374 | } |
|
| 375 | ||
| 376 | public function testClientCanBePublic() |
|
| 377 | { |
|
| 378 | $this->load([ |
|
| 379 | 'clients' => [ |
|
| 380 | 'acme' => [ |
|
| 381 | 'public' => true, |
|
| 382 | ], |
|
| 383 | ], |
|
| 384 | ]); |
|
| 385 | ||
| 386 | $this->assertContainerBuilderHasService('httplug.client.acme'); |
|
| 387 | $this->assertTrue($this->container->getDefinition('httplug.client.acme')->isPublic()); |
|
| 388 | ||
| 389 | if (version_compare(Kernel::VERSION, '3.4', '>=')) { |
|
| 390 | // Symfony made services private by default starting from 3.4 |
|
| 391 | $this->assertFalse($this->container->getDefinition('httplug.client.acme')->isPrivate()); |
|
| 392 | } |
|
| 393 | } |
|
| 394 | ||
| 395 | public function testFlexibleClientCanBePublic() |
|
| 396 | { |
|
| @@ 395-413 (lines=19) @@ | ||
| 392 | } |
|
| 393 | } |
|
| 394 | ||
| 395 | public function testFlexibleClientCanBePublic() |
|
| 396 | { |
|
| 397 | $this->load([ |
|
| 398 | 'clients' => [ |
|
| 399 | 'acme' => [ |
|
| 400 | 'public' => true, |
|
| 401 | 'flexible_client' => true, |
|
| 402 | ], |
|
| 403 | ], |
|
| 404 | ]); |
|
| 405 | ||
| 406 | $this->assertContainerBuilderHasService('httplug.client.acme'); |
|
| 407 | $this->assertTrue($this->container->getDefinition('httplug.client.acme.flexible')->isPublic()); |
|
| 408 | ||
| 409 | if (version_compare(Kernel::VERSION, '3.4', '>=')) { |
|
| 410 | // Symfony made services private by default starting from 3.4 |
|
| 411 | $this->assertFalse($this->container->getDefinition('httplug.client.acme.flexible')->isPrivate()); |
|
| 412 | } |
|
| 413 | } |
|
| 414 | ||
| 415 | public function testHttpMethodsClientCanBePublic() |
|
| 416 | { |
|
| @@ 415-433 (lines=19) @@ | ||
| 412 | } |
|
| 413 | } |
|
| 414 | ||
| 415 | public function testHttpMethodsClientCanBePublic() |
|
| 416 | { |
|
| 417 | $this->load([ |
|
| 418 | 'clients' => [ |
|
| 419 | 'acme' => [ |
|
| 420 | 'public' => true, |
|
| 421 | 'http_methods_client' => true, |
|
| 422 | ], |
|
| 423 | ], |
|
| 424 | ]); |
|
| 425 | ||
| 426 | $this->assertContainerBuilderHasService('httplug.client.acme'); |
|
| 427 | $this->assertTrue($this->container->getDefinition('httplug.client.acme.http_methods')->isPublic()); |
|
| 428 | ||
| 429 | if (version_compare(Kernel::VERSION, '3.4', '>=')) { |
|
| 430 | // Symfony made services private by default starting from 3.4 |
|
| 431 | $this->assertFalse($this->container->getDefinition('httplug.client.acme.http_methods')->isPrivate()); |
|
| 432 | } |
|
| 433 | } |
|
| 434 | ||
| 435 | public function testBatchClientCanBePublic() |
|
| 436 | { |
|
| @@ 435-453 (lines=19) @@ | ||
| 432 | } |
|
| 433 | } |
|
| 434 | ||
| 435 | public function testBatchClientCanBePublic() |
|
| 436 | { |
|
| 437 | $this->load([ |
|
| 438 | 'clients' => [ |
|
| 439 | 'acme' => [ |
|
| 440 | 'public' => true, |
|
| 441 | 'batch_client' => true, |
|
| 442 | ], |
|
| 443 | ], |
|
| 444 | ]); |
|
| 445 | ||
| 446 | $this->assertContainerBuilderHasService('httplug.client.acme'); |
|
| 447 | $this->assertTrue($this->container->getDefinition('httplug.client.acme.batch_client')->isPublic()); |
|
| 448 | ||
| 449 | if (version_compare(Kernel::VERSION, '3.4', '>=')) { |
|
| 450 | // Symfony made services private by default starting from 3.4 |
|
| 451 | $this->assertFalse($this->container->getDefinition('httplug.client.acme.batch_client')->isPrivate()); |
|
| 452 | } |
|
| 453 | } |
|
| 454 | ||
| 455 | /** |
|
| 456 | * @dataProvider provideVcrPluginConfig |
|