phpDocumentor MySQL
UnitTests
[ class tree: MySQL ] [ index: MySQL ] [ all elements ]

Class: Mysql_Exception_Test

Source Location: /unitTests/exception_test.php

Class Mysql_Exception_Test

Class Overview

Unit Tests for Mysql_Exception and Mysql_Dup_Index_Exception classes.

Located in /unitTests/exception_test.php [line 39]

UnitTestCase
   |
   --Mysql_Exception_Test
Author(s): Information Tags:
Link:  http://albertfama.com/pkgs/distro/mysql/mysql.zip
Since:  File available since release .01 Alpha
Version:  1.0 (Stable)
License:  GNU GPL
Copyright:  2009 Albert Fama

Methods

[ Top ]
Method Summary
void   testManualException()   Test of manually sending messages and error codes.
void   testMysqlException()   Test of retrieving messages and error codes from MySQL.
void   throwMysqlException()   Throws an exception passing the parameters onto the exception class.

[ Top ]
Methods
testManualException  [line 66]

  void testManualException( )

Test of manually sending messages and error codes.

Method first test sending an invented error code and message to to Mysql_Excpetion::generateError, and checks that an instance of Mysql_Exception is returned. Method then tests sending an error code of 1062 and checks that an instance of Mysql_Dup_Index_Exception is returned.


API Tags:
Access:  public


[ Top ]
testMysqlException  [line 95]

  void testMysqlException( )

Test of retrieving messages and error codes from MySQL.

Method first tests sending a query which will generate an error code of 1146, and checks that an instance of Mysql_Exception is returned. Method then tests sending a query which will generate an error code of 1062 and checks that an instance of Mysql_Dup_Index_Exception is returned.


API Tags:
Access:  public


[ Top ]
throwMysqlException  [line 50]

  void throwMysqlException( string $message, int $code  )

Throws an exception passing the parameters onto the exception class.

Parameters:
string   $message: 
int   $code: 

API Tags:
Access:  protected

Information Tags:
Throws:  Mysql_Exception

[ Top ]

Documentation generated on Mon, 15 Jun 2009 16:50:04 -0600 by phpDocumentor 1.3.0RC3