ultimix

- Main Page
- Data Structures
- Files
- Examples

- File List
- Globals

unit_tests.php
Go to the documentation of this file.
1 <?php
2
3 /*
4 * This source code is a part of the Ultimix Project.
5 * It is distributed under BSD license. All other third side source code (like tinyMCE) is distributed under
6 * it's own license wich could be found from the corresponding files or sources.
7 * This source code is provided "as is" without any warranties or garanties.
8 *
9 * Have a nice day!
10 *
11 * @url http://ultimix.sorceforge.net
12 *
13 * @author Alexey "gdever" Dodonov
14 */
15
26 class unit_tests{
27
42 function test_simple_http()
43 {
44 try
45 {
46 $http = get_package( 'http' , 'last' , __FILE__ );
47
48 $Response = $http->http_request( 'google.com' );
49
50 if( strpos( $Response , 'google' ) !== false )
51 {
52 return( 'TEST PASSED' );
53 }
54 else
55 {
56 return( 'ERROR' );
57 }
58 }
59 catch( Exception $e )
60 {
61 throw( new Exception( __METHOD__."()::".$e->getMessage() ) );
62 }
63 }
64 }
65
66 ?>