PHP Classes

Mock HTTP Server: Setup and start a HTTP server for testing purposes

Recommend this page to a friend!
     
  Info   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
StarStarStar 58%Total: 388 All time: 6,671 This week: 206Up
Version License PHP version Categories
mock-http-server 1.0.2BSD License5HTTP, PHP 5, Testing
Description 

Author

This class can setup and start a HTTP server for testing purposes.

It provides a class that works as a HTTP server listening on a given port and process requests handled by local files and PHP scripts.

Another class can start an instance of the HTTP server to keep it running on the background and stop it as necessary.

Picture of Lukasz Cepowski
Name: Lukasz Cepowski <contact>
Classes: 3 packages by
Country: Poland Poland
Age: 36
All time rank: 118929 in Poland Poland
Week rank: 214 Up3 in Poland Poland Up
Innovation award
Innovation award
Nominee: 1x

  Files folder image Files (16)  
File Role Description
Files folder imagebin (3 files)
Files folder imagetest (2 files)
Files folder imageweb (3 files, 2 directories)
Plain text file http.php Class HTTP server implementation
Accessible without login Plain text file httpd Appl. Startup script
Accessible without login Plain text file HttpTest.php Test Sample unit test.
Accessible without login Plain text file mimetype.php Conf. Mimetypes for http server
Plain text file Mock_Http_Server.php Class Mock of an HTTP server.

  Files folder image Files (16)  /  bin  
File Role Description
  Plain text file http.php Class Application script
  Accessible without login Plain text file httpd Data Auxiliary data
  Accessible without login Plain text file mimetype.php Appl. Application script

  Files folder image Files (16)  /  test  
File Role Description
  Accessible without login Plain text file HttpTest.php Test Unit test script
  Plain text file Mock_Http_Server.php Class Class source

  Files folder image Files (16)  /  web  
File Role Description
Files folder imagefiles (2 files)
Files folder imagemock (1 file)
  Accessible without login HTML file index.html Data Documentation
  Accessible without login Plain text file phpinfo.php Data Example script
  Accessible without login Plain text file test.php Data Example script

  Files folder image Files (16)  /  web  /  files  
File Role Description
  Accessible without login Image file php.gif Photo Photograph
  Accessible without login Plain text file stylesheet.css Data Auxiliary data

  Files folder image Files (16)  /  web  /  mock  
File Role Description
  Accessible without login Plain text file json.php Aux. Unit test script

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 68%
Total:388
This week:0
All time:6,671
This week:206Up
 User Ratings  
 
 All time
Utility:83%StarStarStarStarStar
Consistency:83%StarStarStarStarStar
Documentation:-
Examples:-
Tests:83%StarStarStarStarStar
Videos:-
Overall:58%StarStarStar
Rank:1494