Services_W3C_HTMLValidator
[ class tree: Services_W3C_HTMLValidator ] [ index: Services_W3C_HTMLValidator ] [ all elements ]

Source for file ValidationSuite.php

Documentation is available at ValidationSuite.php

  1. <?php
  2.  
  3. if (!defined("PHPUnit_MAIN_METHOD")) {
  4.     define("PHPUnit_MAIN_METHOD""ValidationTestSuite::main");
  5. }
  6.  
  7.  
  8. require_once 'PHPUnit/Framework.php';
  9. require_once "PHPUnit/Framework/TestCase.php";
  10. require_once "PHPUnit/Framework/TestSuite.php";
  11. require_once dirname(__FILE__).DIRECTORY_SEPARATOR.'URIValidationTest.php';
  12.  
  13. class ValidationTestSuite extends PHPUnit_Framework_TestSuite
  14. {
  15.     function __construct($name)
  16.     {
  17.         
  18.     }
  19.     
  20.     /**
  21.      * Runs the test suite.
  22.      *
  23.      * @return unknown 
  24.      */
  25.     public static function main()
  26.     {
  27.         include_once "PHPUnit/TextUI/TestRunner.php";
  28.         PHPUnit_TextUI_TestRunner::run(self::suite());
  29.     }
  30.  
  31.     /**
  32.      * Adds the Services_W3C_HTMLValidatorTest suite.
  33.      *
  34.      * @return $suite 
  35.      */
  36.     public static function suite()
  37.     {
  38.         $uris_to_check = array('http://www.unl.edu/',
  39.                                'http://events.unl.edu/',
  40.                                'http://www.google.com/');        
  41.         $suite = new PHPUnit_Framework_TestSuite('ValidationTestSuite tests');
  42.         /** Add tests, if there is. */
  43.         foreach ($uris_to_check as $uri{
  44.             $test      = new URIValidationTest('testURI');
  45.             $test->uri = $uri;
  46.             $suite->addTest($test);
  47.         }
  48.  
  49.         return $suite;
  50.     }
  51. }
  52.  
  53. // Call Services_W3C_HTMLValidatorTest::main() if file is executed directly.
  54. if (PHPUnit_MAIN_METHOD == "ValidationTestSuite::main"{
  55.     ValidationTestSuite::main();
  56. }
  57. ?>

Documentation generated on Mon, 11 Mar 2019 15:37:09 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.