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 7421419
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T08:24:21+00:00 2026-05-29T08:24:21+00:00

I have an AuthenticationService providing methods like performLogin, performSignup, and so on. When testing

  • 0

I have an AuthenticationService providing methods like performLogin, performSignup, and so on. When testing the performSignup-method I use 2 tests:

  • testSuccessfulSignup()
  • testSignupAmbigiousIdentity()

The first test creates a new user account and the second test attempts to create a user with the same identity (e.g. the same email-address). This leads to testSignupAmbigiousIdentity relying on a prior successful outcome from testSuccessfulSignup which I think is a bit clumsy, especially if a simple reordering of the tests (e.g. putting them in alphabetical order) might screw up the test procedure.

Are there any best practices as to how to handle tests relying on previous tests?

TL;DR How can I make a test-method rely on a successful output of another test-method using PHPUnit (3.6).

  • 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-05-29T08:24:22+00:00Added an answer on May 29, 2026 at 8:24 am

    Any test you write should be able to run on its own, and not be dependant on other tests. Not only will your failed tests result point to the wrong test, there can also be scenario’s where you only want to run a part of your tests (failed only comes into mind).

    You should create a setUp that creates a static entry in your test table to test against for the testSignupAmbigiousIdentity method.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have silverlight business application. I added an invoke method to my AuthenticationService class
I have three current thoughts on how to do this: re-implement AuthenticationService, which uses
I have been making use of the WCF Authentication Service in ASP.Net but I
In my login method of my authenticationService, I need to create a cookie and
I'm testing my existing apps in VS 2010, and ran into my first break.
I have a Windows-Forms Application that I configured to use with an ASP.NET Service
I have a bunch of WCF services at a domain: AuthenticationService (the standard MS
I have a RIA service (CustomDomainService), which is composed by few methods that need
Have advancements in CPU design like dynamic instruction scheduling narrowed the performance gap between
I have a Controller that call HttpContext like: [Authorize(Roles = Administrador)] public class ApuradorController

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.