title: PhpStorm Docker PHPUnit Database
body: <ul>
  <li>I <a href="https://blog.jetbrains.com/phpstorm/2016/11/docker-remote-interpreters/" rel="noreferrer">setup</a> PhpStorm: PHP, PHPUnit with Docker</li>
  <li>I see schema in PhpStorm/Database viewer</li>
  <li>I can use database in my application: register etc.</li>
  <li>I can run phpunit in PhpStorm</li>
  <li>But if I would like use database in tests, then I get the following error:</li>
  </ul>
  
  <blockquote>
    <p>Illuminate\Database\QueryException : SQLSTATE[HY000] [2002]
    php_network_getaddresses: getaddrinfo failed: Name does not resolve
    (SQL: select * from <code>tablename</code>)</p>
  </blockquote>
  
  <p>The test working in container but broken in IDE. 
  Do you have any ideas what is the problem in PhpStorm?</p>