You are here

public function SimpleTestExampleTestCase::runningOnTestbot in Examples for Developers 6

Same name and namespace in other branches
  1. 7 simpletest_example/simpletest_example.test \SimpleTestExampleTestCase::runningOnTestbot()

Detect if we're running on Drupal.org's automated testbot.

This is used inside the edit test so that the testbot skips intentionally failing tests. Otherwise, it would mark this module as broken.

For more information on the testbot, see http://qa.drupal.org/.

Return value

boolean TRUE if running on testbot.

1 call to SimpleTestExampleTestCase::runningOnTestbot()
SimpleTestExampleTestCase::testSimpleTestExampleEdit in simpletest_example/simpletest_example.test
Create a simpletest_example node and then see if our user can edit it.

File

simpletest_example/simpletest_example.test, line 92
An example of SimpleTest tests to accompany the tutorial at http://drupal.org/node/395012.

Class

SimpleTestExampleTestCase
Tests the SimpleTest Example module's content type.

Code

public function runningOnTestbot() {
  $testbot_code_directory = "../checkout";
  return file_exists($testbot_code_directory);
}