ultimix

- Main Page
- Data Structures
- Files
- Examples

- Data Structures
- Data Structure Index
- Data Fields

Public Member Functions | Data Fields
SecurityTests Class Reference

## Public Member Functions
| __construct ($thePackageVersion)
| testInt ()
| testFloat1 ()
| testFloat2 ()
| testFloat3 ()
| testCommand ()
| testCommand ()

## Data Fields
| $PackageVersion

## Detailed Description

Definition at line 3 of file unit_tests.php.

## Constructor & Destructor Documentation

__construct | ( |  | $thePackageVersion | ) |

Constructor.

Parameters

  $thePackageVersion | - Package version.

Author
  Dodonov A.A.

Definition at line 21 of file unit_tests.php.

{
$this->PackageVersion = $thePackageVersion;
}

## Member Function Documentation

testCommand | ( |  | ) |

Validating command data conversion.

Author
  Dodonov A.A.

Definition at line 116 of file unit_tests.php.

{
$Security = & get_package( 'security' , $this->PackageVersion );
if( $Security->get( 'asdf_:-фыва<>ASDF' , 'command' ) !== 'asdf_:-ASDF' )
{
$this->setStatus( PUnit_Result_Run::StatusFail );
}
}

testCommand | ( |  | ) |

Validating string data conversion.

Author
  Dodonov A.A.

Definition at line 136 of file unit_tests.php.

{
$Security = & get_package( 'security' , $this->PackageVersion );
if( $Security->get( '<hr>something&' , 'command' ) !== '&lt;hr&gt;something&amp;' )
{
$this->setStatus( PUnit_Result_Run::StatusFail );
}
}

testFloat1 | ( |  | ) |

Validating floating point data conversion.

Author
  Dodonov A.A.

Definition at line 56 of file unit_tests.php.

{
$Security = & get_package( 'security' , $this->PackageVersion );
if( $Security->get( '1.2f34' , float ) !== 1.234 )
{
$this->setStatus( PUnit_Result_Run::StatusFail );
}
}

testFloat2 | ( |  | ) |

Validating floating point data conversion.

Author
  Dodonov A.A.

Definition at line 76 of file unit_tests.php.

{
$Security = & get_package( 'security' , $this->PackageVersion );
if( $Security->get( '1.234e+1' , float ) !== 1.234e+1 )
{
$this->setStatus( PUnit_Result_Run::StatusFail );
}
}

testFloat3 | ( |  | ) |

Validating floating point data conversion.

Author
  Dodonov A.A.

Definition at line 96 of file unit_tests.php.

{
$Security = & get_package( 'security' , $this->PackageVersion );
if( $Security->get( '1.23f4e+1' , float ) !== 1.234e+1 )
{
$this->setStatus( PUnit_Result_Run::StatusFail );
}
}

testInt | ( |  | ) |

Validating integer data conversion.

Author
  Dodonov A.A.

Definition at line 36 of file unit_tests.php.

{
$Security = & get_package( 'security' , $this->PackageVersion );
if( $Security->get( 'id123_a4567' , 'integer' ) !== 1234567 )
{
$this->setStatus( PUnit_Result_Run::StatusFail );
}
}

## Field Documentation

$PackageVersion

Definition at line 5 of file unit_tests.php.

The documentation for this class was generated from the following file:

- packages/security/include/php/unit_tests.php