BlueShoes Application Framework made with PHP http://www.blueshoes.org/


Packageindex Classtrees Modulegroups Elementlist Report XML Files

File: C:/usr/local/lib/php/blueshoes-4.2/core/lang/phpunit/Bs_Assert.class.php
BlueShoes Application Framework - PhpUnit

Bs_Assert

Bs_Object
   |
  +-- Bs_Assert

This class gets extended from Bs_TestCase.

 

private class Bs_Assert extends Bs_Object

This class gets extended from Bs_TestCase.
PHP framework for testing, based on the version from the design of "JUnit".

Authorsandrej arn <andrej@arn.li>
Version4.0.$id$
Copyrightblueshoes.org

 

Methods inherited from Bs_Object

isex, isexception, tostring, tohtml, persist, unpersist, bs_object, bbsetoutput, bbawake, bbisawake, bbxmsg, bbxfunctionstart, bbxfunctionend, bbxecho, bbxvar, bbxvardump, bbforcetrace, bbbufferstart, bbbufferget, bbbufferendflush, bbbufferendclean

Public Method Summary

void

Bs_Assert()

Constructor.
void

assertEquals(string $expected, string $actual, [ string $message ])

Checks whether the expected result matches the actual result we got from the function we tested.
void

assertRegexp(string $regexp, string $actual, [ string $message, string $regFunction ])

Checks whether the result we got matches our regular expression.
void

assertEqualsType(string $expected, string $actual, [ string $message ])

Checks whether the data type of result we got matches our expected data type.
void

assertInstanceOf(string $expected, string $actual, [ string $message ])

Checks whether the class of which the result is an instance of matches our expected class name.
void

failNotEquals(string $expected, string $actual, string $expectedLabel, [ string $message ])

Private function for reporting failure to match.
void

fail(string $str)

YOU HAVE TO OVERWRITE THIS FUNCTION!!!

Private Method Summary

void

assert( $boolean, string $message)

Warning: documentation is missing.

Public Method Details

Bs_Assert

public void Bs_Assert( )

  Constructor.

Returns void


assertEquals

public void assertEquals( string $expected, string $actual, [ string $message ] )

  Checks whether the expected result matches the actual result we got from the function we tested.

Parameter
string $expected
restul
string $actual
result
string $message = >>''<<
Returns void


assertRegexp

public void assertRegexp( string $regexp, string $actual, [ string $message, string $regFunction ] )

  Checks whether the result we got matches our regular expression.

Parameter
string $regexp
string $actual
result
string $message = >>''<<
string $regFunction = >>'ereg'<<
default is 'ereg', can also be 'eregi', 'preg_match', ... check the manual.
Returns void


assertEqualsType

public void assertEqualsType( string $expected, string $actual, [ string $message ] )

  Checks whether the data type of result we got matches our expected data type.

Parameter
string $expected
the expected data type, eg 'string'
string $actual
result
string $message = >>''<<
Returns void


assertInstanceOf

public void assertInstanceOf( string $expected, string $actual, [ string $message ] )

  Checks whether the class of which the result is an instance of matches our expected class name.

Parameter
string $expected
the expected class name, eg 'Bs_Date'
string $actual
result
string $message = >>''<<
Returns void


failNotEquals

public void failNotEquals( string $expected, string $actual, string $expectedLabel, [ string $message ] )

  Private function for reporting failure to match.
When we didn't get the result we expected (or the regexp didn't match) this method gets called.

Parameter
string $expected
string $actual
string $expectedLabel
string $message = >>''<<
Returns void


fail

public void fail( string $str )

  YOU HAVE TO OVERWRITE THIS FUNCTION!!!

Parameter
string $str
Returns void


Private Method Details

assert

private void assert( $boolean, string $message )

 

Warning: documentation is missing.

Parameter
$boolean
Warning: documentation is missing.
string $message
Warning: documentation is missing.
Returns void



Packageindex Classtrees Modulegroups Elementlist Report XML Files
PHPDoc 1.0beta