| @@ 364-376 (lines=13) @@ | ||
| 361 | } |
|
| 362 | } |
|
| 363 | ||
| 364 | public function testFlexibleClientShouldBePrivateByDefault(): void |
|
| 365 | { |
|
| 366 | $this->load([ |
|
| 367 | 'clients' => [ |
|
| 368 | 'acme' => [ |
|
| 369 | 'flexible_client' => true, |
|
| 370 | ], |
|
| 371 | ], |
|
| 372 | ]); |
|
| 373 | ||
| 374 | $this->assertContainerBuilderHasService('httplug.client.acme'); |
|
| 375 | $this->assertFalse($this->container->getDefinition('httplug.client.acme.flexible')->isPublic()); |
|
| 376 | } |
|
| 377 | ||
| 378 | public function testHttpMethodsClientShouldBePrivateByDefault(): void |
|
| 379 | { |
|
| @@ 378-390 (lines=13) @@ | ||
| 375 | $this->assertFalse($this->container->getDefinition('httplug.client.acme.flexible')->isPublic()); |
|
| 376 | } |
|
| 377 | ||
| 378 | public function testHttpMethodsClientShouldBePrivateByDefault(): void |
|
| 379 | { |
|
| 380 | $this->load([ |
|
| 381 | 'clients' => [ |
|
| 382 | 'acme' => [ |
|
| 383 | 'http_methods_client' => true, |
|
| 384 | ], |
|
| 385 | ], |
|
| 386 | ]); |
|
| 387 | ||
| 388 | $this->assertContainerBuilderHasService('httplug.client.acme'); |
|
| 389 | $this->assertFalse($this->container->getDefinition('httplug.client.acme.http_methods')->isPublic()); |
|
| 390 | } |
|
| 391 | ||
| 392 | public function testBatchClientShouldBePrivateByDefault(): void |
|
| 393 | { |
|
| @@ 392-404 (lines=13) @@ | ||
| 389 | $this->assertFalse($this->container->getDefinition('httplug.client.acme.http_methods')->isPublic()); |
|
| 390 | } |
|
| 391 | ||
| 392 | public function testBatchClientShouldBePrivateByDefault(): void |
|
| 393 | { |
|
| 394 | $this->load([ |
|
| 395 | 'clients' => [ |
|
| 396 | 'acme' => [ |
|
| 397 | 'batch_client' => true, |
|
| 398 | ], |
|
| 399 | ], |
|
| 400 | ]); |
|
| 401 | ||
| 402 | $this->assertContainerBuilderHasService('httplug.client.acme'); |
|
| 403 | $this->assertFalse($this->container->getDefinition('httplug.client.acme.batch_client')->isPublic()); |
|
| 404 | } |
|
| 405 | ||
| 406 | public function testClientCanBePublic(): void |
|
| 407 | { |
|