title: Symfony unit testing
body: <p>Following is my directory structure:</p>
  
  <pre><code>     |-vendor
       |---bin
       |---phpunit
       |---autoload.php
       |---psr
       |---sebastian
       |---phar-io
       |---composer
       |---symfony
       |-.htaccess
       |-composer.lock
       |-includes
       |---application_top.php
       |-routes
       |---routes.php
       |-modules
       |---Controllers
       |----CheckoutGatewayController.php
       |-tests
       |---Controllers
       |----tests_common_includes.php
       |-composer.phar
  </code></pre>
  
  <p>I am trying to run <code>./vendor/bin/simple-phpunit --bootstrap tests/tests_common_includes.php tests/Controllers/CheckoutGatewayTests.php</code> from my base directory but it gives me error <code>Class 'tests/Controllers/CheckoutGatewayTests' could not be found in 'tests/Controllers/CheckoutGatewayTests.php'.</code> </p>
  
  <p>If I try <code>./vendor/bin/phpunit --bootstrap tests/tests_common_includes.php tests/Controllers/CheckoutGatewayTests.php</code> then I get the error <code>Unable to guess the Kernel directory</code>. I tried to look up symfony's documentation : it suggests using either <code>-c app</code> option or changing <code>phpunit.dist.xml</code> file. But I have neither of those in my directory. There is no xml file and no app folder.</p>
  
  <p>How can I execute my tests? My test file <code>CheckoutGatewayTests.php</code> looks like this : </p>
  
  <pre><code>     &lt;?php
  
       use \Controllers\CheckoutGatewayController;
       use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
  
       class CheckoutGatewayTests extends WebTestCase {
  
  
       public function testChargebackCallback() {
               $client = static::createClient();
               $client-&gt;request('GET', '/post/hello-world');
           }
  
       }
  </code></pre>
  
  <p>Edit: my composer.json file </p>
  
  <pre><code>        {
          "require": {
              "guzzlehttp/guzzle": "~6.0",
              "psr/log": "^1.0",
              "zircote/swagger-php": "^2.0",
              "sentry/sentry": "^1.8",
              "aws/aws-sdk-php": "^3.52",
              "league/flysystem-aws-s3-v3": "~1.0",
              "symfony/routing": "^3.4",
              "symfony/http-kernel": "^3.4",
              "symfony/dependency-injection": "^3.4",
              "symfony/framework-bundle": "^3.4",
              "prbdias/mbway-php": "0.1"
          },
  
          "require-dev": {
              "phpunit/phpunit": "^6"
          },
  
          "config": {
              "optimize-autoloader": true
          },
  
          "autoload": {
              "psr-4": {
                  "": ["modules/", "tests/","routes/"]
              }
          }
  
      }
  </code></pre>