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, 2020 in PHP by kartik
• 37,520 points
2,280 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, 2020 by Niroj
• 82,840 points

Related Questions In PHP

0 votes
1 answer

Fatal error: Class 'Illuminate\Foundation\Application' not found

Hello @kartik, Something is clearly corrupt in your ...READ MORE

answered Nov 5, 2020 in PHP by Niroj
• 82,840 points
15,463 views
0 votes
1 answer

Error: Class 'NumberFormatter' not found

Hello @kartik, You just need to enable this ...READ MORE

answered Nov 16, 2020 in PHP by Niroj
• 82,840 points
5,674 views
0 votes
0 answers

PHP Fatal error: Using $this when not in object context

I am working on a new WebApp without ...READ MORE

Jun 18, 2022 in PHP by narikkadan
• 63,600 points
1,025 views
0 votes
1 answer

Fatal error: Cannot access empty property in C:\xampp\htdocs\MyTestPages\f.php on line 15

Hello @kartik, You access the property in the ...READ MORE

answered Oct 19, 2020 in PHP by Niroj
• 82,840 points
1,879 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, 2020 in Laravel by Niroj
• 82,840 points
23,017 views
0 votes
1 answer

What is redirection in Laravel?

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

answered Mar 18, 2020 in Laravel by Niroj
• 82,840 points
2,999 views
0 votes
1 answer

How to install Laravel via composer?

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

answered Mar 23, 2020 in Laravel by Niroj
• 82,840 points
2,922 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, 2020 in Laravel by Niroj
• 82,840 points
44,723 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, 2020 in PHP by Niroj
• 82,840 points
4,654 views
0 votes
1 answer
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP