Fatal error: Class 'PHPUnit_Framework_TestCase' not found in .?

0 votes

Why I'm getting this PHP error?

Fatal error: Class 'PHPUnit_Framework_TestCase' not found in ...
May 19 in PHP by kartik
• 26,740 points
84 views

1 answer to this question.

0 votes

Hello @kartik,

You may get this error because you namespaced the file. If so you will need to specify that PHPUnit_Framework_TestCase is in the global namespace by preceding it with a backslash:

namespace AcmeInc\MyApplication\Tests
class StackTest extends \PHPUnit_Framework_TestCase {}

Thank You!!

answered May 19 by Niroj
• 57,700 points

Related Questions In PHP

0 votes
1 answer

Error: Global Variable is not accessable to local function

Hey kartik, A variable declared outside a function has a ...READ MORE

answered Feb 19 in PHP by Niroj
• 57,700 points
89 views
0 votes
1 answer

Error:PDOException SQLSTATE[HY000] [2020] No such file or directory in php?

Hello, I checked php -i | grep pdo and noticed ...READ MORE

answered Apr 2 in PHP by Niroj
• 57,700 points
128 views
0 votes
1 answer

Error:“Connection for controluser as defined in your configuration failed” with phpMyAdmin in XAMPP

Hii, I edited /etc/phpmyadmin/config.inc.php and changed the following ...READ MORE

answered Apr 20 in PHP by Niroj
• 57,700 points
770 views
0 votes
1 answer

Error:WP_Query() does not return all entries

Hello, Try adding posts_per_page=-1 to the string of parameters passed ...READ MORE

answered May 8 in PHP by Niroj
• 57,700 points
58 views
+1 vote
1 answer

How to make anchor tag with routing using Laravel?

Hey @kartik, First you have to go to ...READ MORE

answered Mar 18 in Laravel by Niroj
• 57,700 points
2,119 views
0 votes
1 answer

What is redirection in Laravel?

Named route is used to give specific ...READ MORE

answered Mar 18 in Laravel by Niroj
• 57,700 points
230 views
0 votes
1 answer

How to install Laravel via composer?

Hello, This is simple you just need to ...READ MORE

answered Mar 23 in Laravel by Niroj
• 57,700 points
185 views
+1 vote
1 answer

What are named routes in Laravel and How can specify route names for controller actions?

Hey @kartik, Named routing is another amazing feature of ...READ MORE

answered Mar 23 in Laravel by Niroj
• 57,700 points
2,582 views
0 votes
1 answer

error: Class 'PHPUnit_Framework_TestCase' not found in …?

Hello,  You can use TestCase instead PHPUnit_Framework_TestCase // use the following namespace use ...READ MORE

answered Apr 20 in PHP by Niroj
• 57,700 points
368 views
0 votes
1 answer