Adam Monsen
Adam Monsen

Reputation: 9420

symfony 2.1: phpunit -c app tries to run symfony core tests

In my Symfony 2.1 app, I'm unable to run the recommended phpunit -c app/. I get the following error message (I added linebreaks):

PHPUnit 3.6.10 by Sebastian Bergmann.

Configuration read from /symfony2-dual-auth/app/phpunit.xml.dist

F

PHP Fatal error:  main(): Failed opening required
'/symfony2-dual-auth/vendor/symfony/symfony/vendor/autoload.php'  
(include_path='.:/usr/share/php:/usr/share/pear')
in /symfony2-dual-auth/vendor/symfony/symfony/autoload.php.dist on line 3

Complete source code here: https://github.com/meonkeys/symfony2-dual-auth . Except the test, since it doesn't pass. Here's src/Oh/FOSFacebookUserBundle/Tests/SimpleFunctionalTest.php...

<?php

namespace Oh\FOSFacebookUserBundle\Tests;

use Symfony\Bundle\FrameworkBundle\Tests\Functional\WebTestCase;

class SimpleFunctionTest extends WebTestCase {

  public function testIndex() {
    $client = static::createClient();

    $crawler = $client->request('GET', '/login');

    $this->assertEquals(1, $crawler->filter('html:contains("Remember me")')->count());
  }

}

Upvotes: 2

Views: 1105

Answers (1)

Adam Monsen
Adam Monsen

Reputation: 9420

I was extending the wong class. Here's the fix:

-use Symfony\Bundle\FrameworkBundle\Tests\Functional\WebTestCase;
+use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;

Upvotes: 6

Related Questions