better comments and readme

This commit is contained in:
James 2019-09-22 09:04:50 +01:00
parent f9cb9aac4c
commit 2746dbdb63
4 changed files with 26 additions and 0 deletions

11
README.md Normal file
View File

@ -0,0 +1,11 @@
The base (abstract) classes for my PHPUnit testing scripts.
## BrowserTest.php
Set up the Selenium test using args from environment
Take a screenshot on failed test
## DomainRedirectTest.php
This will test all combinations of http/https/www/trailing slash, checking that they all redirect to the same destination URL.
## UrlRedirectTest.php
This will check (using curl) that the source URL redirects to the destination URL

View File

@ -1,6 +1,11 @@
<?php <?php
namespace JHodges\PHPUnitBase; namespace JHodges\PHPUnitBase;
/**
* Set up the Selenium test using args from environment
* Take a screenshot on failed test
**/
abstract class BrowserTest extends \PHPUnit_Extensions_Selenium2TestCase{ abstract class BrowserTest extends \PHPUnit_Extensions_Selenium2TestCase{
public function setUp(){ public function setUp(){

View File

@ -1,6 +1,11 @@
<?php <?php
namespace JHodges\PHPUnitBase; namespace JHodges\PHPUnitBase;
/**
* This will test all combinations of http/https/www/trailing slash.
* Checking that they all redirect to the same destination URL.
**/
abstract class DomainRedirectTest extends UrlRedirectTest{ abstract class DomainRedirectTest extends UrlRedirectTest{
/** /**

View File

@ -3,6 +3,11 @@ namespace JHodges\PHPUnitBase;
use \PHPUnit\Framework\TestCase; use \PHPUnit\Framework\TestCase;
/**
* This will check (using curl) that the source
* URL redirects to the destination URL
**/
abstract class UrlRedirectTest extends TestCase{ abstract class UrlRedirectTest extends TestCase{
/** /**