简体   繁体   English

我正在尝试在单元测试中使用KernetTestKase,但出现“未找到”错误

[英]I'm trying to use KernetTestKase in my unit tests, but I get a “not found” error

I'm trying to follow some examples of using KernetTestCase for a Symfony 2 test that touches the DB. 我正在尝试遵循一些示例,这些示例使用KernetTestCase进行涉及数据库的Symfony 2测试。

I get this error: 我收到此错误:

Fatal error: Class 'Symfony\\Bundle\\FrameworkBundle\\Test\\KernelTestCase' not found in...

In my test files I have: 在我的测试文件中,我有:

use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;

and

class AcmeContestTest extends KernelTestCase

However I still get the error above when running tests... 但是在运行测试时我仍然收到上面的错误...

I figured out that Symfony version 2.3 which I'm using doesn't have KernelTestCase extracted out of WebTestCase as Symfony version 2.5 has... 我发现我正在使用的Symfony 2.3版没有从WebTestCase中提取KernelTestCase,因为Symfony 2.5版具有...

for reference check out: https://github.com/symfony/symfony/tree/master/src/Symfony/Bundle/FrameworkBundle/Test 供参考,请查看: https : //github.com/symfony/symfony/tree/master/src/Symfony/Bundle/FrameworkBundle/Test

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 我正在尝试用密码保护我的网站,当我弹出窗口登录并使用我的信用凭证时 - I'm trying to password protect my website and when i get the popup to login and i use my creds 我正在尝试在我的本地XAMPP服务器上运行我的Codeigniter项目,但我要么拒绝连接,要么找不到网站或者没有现有域名 - I'm trying to run my Codeigniter Project on my local XAMPP server but I either get connection refused, website not found or not existing domain 我正在尝试使用 PHPmailer 发送电子邮件,但我收到此错误 - i'm trying to send emails using PHPmailer but i Get this error 我正在尝试使用laravel在数据库上使用多个过滤器 - I'm trying to use multiple filters on my database with laravel 我正在尝试在我的网站中使用dokuwiki解析器引擎 - I'm trying to use dokuwiki parser engine in my website 试图在本地上传1M文件,我收到致命错误 - Trying to upload a 1M file locally and i get a Fatal Error 我正在我的网站上测试注入,我收到这个错误 - I'm testing for injection in my website, I get this error 我正在尝试使用mysqli查询我的mysql数据库,但是却出现内存错误 - I'm trying to query my mysql db with mysqli, however I'm getting memory error 我正在尝试使一个函数(按钮)将图像上传到CodeIgniter(PHP)中的数据库。 但是我出错了 - I'm trying to make a function (button) to upload images to my database in CodeIgniter (PHP). But I'm getting an error 我正在尝试使用表格中的数据填充模式文本框,但无法正常工作 - I'm trying to populate my modal textboxes with datas from my table but i can't get it to work
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM