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

Class: PHPUnit2_Util_Skeleton

Source Location: /PHPUnit2-2.3.6/Util/Skeleton.php

Class Overview


Class for creating a PHPUnit2_Framework_TestCase skeleton file.


Author(s):

Version:

  • Release: @package_version@

Copyright:

  • 2002-2006 Sebastian Bergmann <sb@sebastian-bergmann.de>

Methods


Inherited Variables

Inherited Methods


Class Details

[line 78]
Class for creating a PHPUnit2_Framework_TestCase skeleton file.

This class will take a classname as a parameter on construction and will create a PHP file that contains the skeleton of a PHPUnit2_Framework_TestCase subclass.


1 <?php
2 require_once 'PHPUnit2/Util/Skeleton.php';
3
4 $skeleton = new PHPUnit2_Util_Skeleton(
5 'PHPUnit2_Util_Skeleton',
6 'PHPUnit2/Util/Skeleton.php'
7 );
8
9 $skeleton->write();
10 ?>



[ Top ]


Method Detail

generate   [line 147]

string generate( )

Generates the test class' source.
  • Access: public

[ Top ]

setTemplates   [line 193]

void setTemplates( string $classHeader, string $classFooter, string $method)

Sets the templates for class header, class footer, and method.
  • Since: Method available since Release 2.2.0
  • Access: public

Parameters:

string   $classHeader     
string   $classFooter     
string   $method     

[ Top ]

testClassFooter   [line 240]

void testClassFooter( string $className)

  • Access: protected

Parameters:

string   $className     

[ Top ]

testClassHeader   [line 218]

void testClassHeader( string $className, string $classSourceFile)

  • Access: protected

Parameters:

string   $className     
string   $classSourceFile     

[ Top ]

testMethod   [line 256]

void testMethod( string $methodName)

  • Access: protected

Parameters:

string   $methodName     

[ Top ]

write   [line 173]

void write( [string $file = ''])

Generates the test class and writes it to a source file.
  • Access: public

Parameters:

string   $file     

[ Top ]

__construct   [line 108]

void __construct( string $className, [string $classSourceFile = ''])

Constructor.
  • Access: public
  • Throws: Exception

Parameters:

string   $className     
string   $classSourceFile     

[ Top ]


Documentation generated on Tue, 12 Sep 2006 09:35:24 -0400 by phpDocumentor 1.2.3. PEAR Logo Copyright © PHP Group 2004.