gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-12-02 18:01:45 24 4
gpt4 key购买 nike

在我的 Symfony 2.1 应用程序中,我无法运行 recommended phpunit -c 应用程序/。我收到以下错误消息(我添加了换行符):

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

完整源代码在这里:https://github.com/meonkeys/symfony2-dual-auth 。除了测试,因为它没有通过。这是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());
}

}

最佳答案

我正在扩展 Wong 类(class)。 Here's the fix :

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

关于交响乐 2.1 : phpunit -c app tries to run symfony core tests,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12557290/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com