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