Phpunit Dbunit Testcase class not found

Asked

Viewed 138 times

0

Galley

When I run a test on phpunit whose class extends from Phpunit Dbunit Testcase I get this message:

PHP Fatal error:  Class 'PHPUnit\DbUnit\TestCase' not found

But when I run a test of a class extending Phpunit Framework Testcase works!

This is my Composer.json:

{
  "require": {
  },
  "require-dev": {
    "phpunit/phpunit": "6.0.7",
    "phpunit/dbunit": "^3.0"
  }
}

Any idea?

  • Have you checked the briefcase vendor if the dbunit was installed correctly?

  • Using php 7 in the command line interface (CLI)? If not sure php -v

  • Anderson, what do you mean installed correctly?

  • Hello, William. Yes, php 7. Confirmed by php -v.

  • Exists the directory dbunit referring to the repository within vendor? Maybe when you executed composer install made a mistake that went unnoticed.

  • The dbunit directory does exist. I thought about it before, but had checked. Apparently everything is normal.

Show 1 more comment
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.