Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8698697
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T01:47:00+00:00 2026-06-13T01:47:00+00:00

Is there a way I can have PHPUnit just continue after an error? For

  • 0

Is there a way I can have PHPUnit just continue after an error? For example, I have a large test suite (400+ steps) and I would prefer that if say, an element is not found, it doesn’t stop the rest of my script from continuing.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T01:47:02+00:00Added an answer on June 13, 2026 at 1:47 am

    There is a better way to do this. Instead of overloading every assert*() method you can overload just one method: runTest(). It is for each assertion, and exceptions can be caught:

    abstract class AMyTestCase extends PHPUnit_Framework_TestCase
    {
        public function runTest()
        {
            try {
                parent::runTest();
            }
            catch ( MyCustomException $Exc ) {
                // will continue tests
            }
            catch ( Exception $Exc ) {
                if ( false === strpos($Exc->getMessage(), 'element not found') ) {
                    // rethrow:
                    throw $Exc;
                }
                // will also continue
            }
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there any way that I can pass arguments in selector? example: I have
Is there any way I can have a thread branch off into its own
Is there a way I can have a custom quick launch menu on a
Is there a way I can have a google maps control on a web
Is there a way I can have an excel track the number of times
Is there any way I can combine list of expressions into one? I have
If I have a console application, is there any way I can handle the
I have a reference to a UIBarButtonItem, is there a way I can add
I have a data() object containing some json. Is there a way I can
I have a Silverlight application running full screen. Is there a way i can

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.