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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T11:28:38+00:00 2026-06-13T11:28:38+00:00

file1: <?php require_once(‘simpletest/autorun.php’); require_once(‘simpletest/web_tester.php’); class TestOfRankings extends WebTestCase { function tesetWeAreTopOfGoogle() { $this->get(‘http://poll:8888/index.php/admin/unit_test’); $this->assertText(‘this

  • 0

file1:

<?php
require_once('simpletest/autorun.php');
require_once('simpletest/web_tester.php');

class TestOfRankings extends WebTestCase {
    function tesetWeAreTopOfGoogle() {
        $this->get('http://poll:8888/index.php/admin/unit_test');
        $this->assertText('this is good');
    }
}
?>

file2:

require_once('simpletest/autorun.php');
require_once('simpletest/web_tester.php');

class MakTest extends WebTestCase {
    function testOneAndOneMakesTwo() {
        $this->get('http://poll:8888/index.php/admin/unit_test');
        $this->assertText('this is good');
    }
}

almost identical files, why do they give me different result?

file1.php
OK
Test cases run: 0/2, Passes: 0, Failures: 0, Exceptions: 0


file2.php
OK
Test cases run: 1/2, Passes: 1, Failures: 0, Exceptions: 0
  • 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-13T11:28:39+00:00Added an answer on June 13, 2026 at 11:28 am

    According to the SimpleTest docs:

    When a test case runs, it will search for any method that starts with the string “test” and execute that method. If the method starts “test”, it’s a test.

    In file1 the function name is tesetWeAreTopOfGoogle (this seems to be a typo). Switch to testWeAreTopOfGoogle and you’ll be golden.

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

Sidebar

Related Questions

I have a php file which has a require_once Statement (?) this file is
I have a section of code like the following: ---- file.php ---- require_once(mylib.php); function($a,$b)
This is what I have in foo.php class Foo { public $foo = NULL;
I am using following code to populate DropDown: $(document).ready(function(){ $('#inDistrict').sSelect(); $(#inDistrict).change(function(){ $.getJSON(filldistricts.php,{id: $(this).val(), ajax:
I am getting the following error while running the code, Warning: require_once(product.php) [function.require-once]: failed
//file foo.php <?php namespace foo; class foo{ function __construct(){ echo hello; } } ?>
Sample Code: Config.php: class Config { public $serverIP = 1.1.1.10; } DB.php: require_once /home/mysite/PHP/Config.php;
This is how I've set up my Singleton <?php class MySingleton { private static
This is a very basic php question : suppose I have 3 files, file1,
If I try to open this simple file in my Browser: <?php require_once 'classes/settings.php';

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.