Testing_DocTest
[ class tree: Testing_DocTest ] [ index: Testing_DocTest ] [ all elements ]

Class: Testing_DocTest_TestCase

Source Location: /Testing_DocTest-0.6.0/Testing/DocTest/TestCase.php

Class Overview


This class represents a block that contains the doc test.


Author(s):

Version:

  • Release: 0.6.0

Copyright:

  • 2008 David JEAN LOUIS

Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 49]
This class represents a block that contains the doc test.

  1.  $tb        = new Testing_DocTest_TestCase();
  2.  $tb->level = 'function';
  3.  $tb->name  = 'someFunction';
  4.  echo $tb->name . "\n";
  5.  $tb->altname = 'Alt name';
  6.  echo $tb->name;
  7.  // expects:
  8.  // function someFunction
  9.  // Alt name



[ Top ]


Class Variables

$iniSettings = array(
        'output_handler'       => '',
        'output_buffering'     => '0',
        'safe_mode'            => '0',
        'display_errors'       => '1',
        'error_prepend_string' => '',
        'error_append_string'  => '',
        'auto_prepend_file'    => '',
        'auto_append_file'     => '',
    )

[line 112]

Array of ini settings to pass to the process of the testcase.
  • Access: public

Type:   array


[ Top ]



Method Detail

hasFlag   [line 209]

boolean hasFlag( int $flag)

Return true if the test has the flag $flag set or not.

  1.  require_once "Testing/DocTest.php";
  2.  $test = new Testing_DocTest_TestCase();
  3.  $test->flags  = Testing_DocTest::FLAG_ELLIPSIS
  4.                | Testing_DocTest::FLAG_NORMALIZE_WHITESPACE
  5.                | Testing_DocTest::FLAG_CASE_INSENSITIVE;
  6.  $test->flags &= ~Testing_DocTest::FLAG_CASE_INSENSITIVE;
  7.  var_dump($test->flags);
  8.  var_dump($test->hasFlag(Testing_DocTest::FLAG_ELLIPSIS));
  9.  var_dump($test->hasFlag(Testing_DocTest::FLAG_NORMALIZE_WHITESPACE));
  10.  var_dump($test->hasFlag(Testing_DocTest::FLAG_CASE_INSENSITIVE));
  11.  // expects:
  12.  // int(9)
  13.  // bool(true)
  14.  // bool(true)
  15.  // bool(false)

  • Access: public

Parameters:

int   $flag   —  one of the DOCTEST::FLAG_* constants.

[ Top ]

__get   [line 165]

mixed __get( string $name)

Overloaded getter.
  • Access: public

Parameters:

string   $name   —  name of property

[ Top ]

__set   [line 149]

void __set( string $name, mixed $value)

Overloaded setter.
  • Access: public

Parameters:

string   $name   —  name of property
mixed   $value   —  value of property

[ Top ]

__toString   [line 132]

string __toString( )

String representation of the test.
  • Access: public

[ Top ]


Documentation generated on Mon, 11 Mar 2019 15:52:27 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.