@@ 348-365 (lines=18) @@ | ||
345 | $this->assertFalse($this->container->getDefinition('httplug.client.acme.batch_client')->isPublic()); |
|
346 | } |
|
347 | ||
348 | public function testClientCanBePublic() |
|
349 | { |
|
350 | $this->load([ |
|
351 | 'clients' => [ |
|
352 | 'acme' => [ |
|
353 | 'public' => true, |
|
354 | ], |
|
355 | ], |
|
356 | ]); |
|
357 | ||
358 | $this->assertContainerBuilderHasService('httplug.client.acme'); |
|
359 | $this->assertTrue($this->container->getDefinition('httplug.client.acme')->isPublic()); |
|
360 | ||
361 | if (version_compare(Kernel::VERSION, '3.4', '>=')) { |
|
362 | // Symfony made services private by default starting from 3.4 |
|
363 | $this->assertFalse($this->container->getDefinition('httplug.client.acme')->isPrivate()); |
|
364 | } |
|
365 | } |
|
366 | ||
367 | public function testFlexibleClientCanBePublic() |
|
368 | { |
|
@@ 367-385 (lines=19) @@ | ||
364 | } |
|
365 | } |
|
366 | ||
367 | public function testFlexibleClientCanBePublic() |
|
368 | { |
|
369 | $this->load([ |
|
370 | 'clients' => [ |
|
371 | 'acme' => [ |
|
372 | 'public' => true, |
|
373 | 'flexible_client' => true, |
|
374 | ], |
|
375 | ], |
|
376 | ]); |
|
377 | ||
378 | $this->assertContainerBuilderHasService('httplug.client.acme'); |
|
379 | $this->assertTrue($this->container->getDefinition('httplug.client.acme.flexible')->isPublic()); |
|
380 | ||
381 | if (version_compare(Kernel::VERSION, '3.4', '>=')) { |
|
382 | // Symfony made services private by default starting from 3.4 |
|
383 | $this->assertFalse($this->container->getDefinition('httplug.client.acme.flexible')->isPrivate()); |
|
384 | } |
|
385 | } |
|
386 | ||
387 | public function testHttpMethodsClientCanBePublic() |
|
388 | { |
|
@@ 387-405 (lines=19) @@ | ||
384 | } |
|
385 | } |
|
386 | ||
387 | public function testHttpMethodsClientCanBePublic() |
|
388 | { |
|
389 | $this->load([ |
|
390 | 'clients' => [ |
|
391 | 'acme' => [ |
|
392 | 'public' => true, |
|
393 | 'http_methods_client' => true, |
|
394 | ], |
|
395 | ], |
|
396 | ]); |
|
397 | ||
398 | $this->assertContainerBuilderHasService('httplug.client.acme'); |
|
399 | $this->assertTrue($this->container->getDefinition('httplug.client.acme.http_methods')->isPublic()); |
|
400 | ||
401 | if (version_compare(Kernel::VERSION, '3.4', '>=')) { |
|
402 | // Symfony made services private by default starting from 3.4 |
|
403 | $this->assertFalse($this->container->getDefinition('httplug.client.acme.http_methods')->isPrivate()); |
|
404 | } |
|
405 | } |
|
406 | ||
407 | public function testBatchClientCanBePublic() |
|
408 | { |
|
@@ 407-425 (lines=19) @@ | ||
404 | } |
|
405 | } |
|
406 | ||
407 | public function testBatchClientCanBePublic() |
|
408 | { |
|
409 | $this->load([ |
|
410 | 'clients' => [ |
|
411 | 'acme' => [ |
|
412 | 'public' => true, |
|
413 | 'batch_client' => true, |
|
414 | ], |
|
415 | ], |
|
416 | ]); |
|
417 | ||
418 | $this->assertContainerBuilderHasService('httplug.client.acme'); |
|
419 | $this->assertTrue($this->container->getDefinition('httplug.client.acme.batch_client')->isPublic()); |
|
420 | ||
421 | if (version_compare(Kernel::VERSION, '3.4', '>=')) { |
|
422 | // Symfony made services private by default starting from 3.4 |
|
423 | $this->assertFalse($this->container->getDefinition('httplug.client.acme.batch_client')->isPrivate()); |
|
424 | } |
|
425 | } |
|
426 | } |
|
427 |