title: Symfony 4. Special container that allows fetching private services
body: <p>On the page <a href="https://symfony.com/blog/new-in-symfony-4-1-simpler-service-testing" rel="nofollow noreferrer">https://symfony.com/blog/new-in-symfony-4-1-simpler-service-testing</a> stands</p>
  
  <pre><code>// gets the special container that allows fetching private services
  $container = self::$container;
  </code></pre>
  
  <p>But it takes no effect for me in functional tests. Only when I define the service as public, I can use <code>$container-&gt;set('service.mail', $someService);</code></p>
  
  <p>What is here wrong?</p>