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

Class: PHPUnit2_Util_Report_Coverage_Factory

Source Location: /PHPUnit2-3.0.0alpha11/Util/Report/Coverage/Factory.php

Class Overview


Factory for a code coverage information tree.


Author(s):

Version:

  • Release: @package_version@

Copyright:

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

Methods


Inherited Variables

Inherited Methods


Class Details

[line 70]
Factory for a code coverage information tree.


[ Top ]


Method Detail

addItems   [line 101]

void addItems( PHPUnit2_Util_Report_Coverage_Node_Directory $root, Array $items, PHPUnit2_Util_Report_Test_Node_TestSuite $testSuite, Array $files)

  • Access: protected

Parameters:

PHPUnit2_Util_Report_Coverage_Node_Directory   $root   — 
array   $items   — 
PHPUnit2_Util_Report_Test_Node_TestSuite   $testSuite   — 
array   $files   — 

[ Top ]

buildDirectoryStructure   [line 219]

array buildDirectoryStructure( array $files)

Builds an array representation of the directory structure.

For instance,

  1.  Array
  2.  (
  3.      [Money.php=> Array
  4.          (
  5.              ...
  6.          )
  7.  
  8.      [MoneyBag.php=> Array
  9.          (
  10.              ...
  11.          )
  12.  )

is transformed into

  1.  Array
  2.  (
  3.      [.=> Array
  4.          (
  5.              [Money.php=> Array
  6.                  (
  7.                      ...
  8.                  )
  9.  
  10.              [MoneyBag.php=> Array
  11.                  (
  12.                      ...
  13.                  )
  14.          )
  15.  )

  • Access: protected

Parameters:

array   $files   — 

[ Top ]

create   [line 81]

PHPUnit2_Util_Report_Coverage_Node_Directory create( PHPUnit2_Framework_TestResult $result, PHPUnit2_Util_Report_Test_Node_TestSuite $testSuite)

Creates a new Code Coverage information tree.
  • Access: public

Parameters:

PHPUnit2_Framework_TestResult   $result   — 
PHPUnit2_Util_Report_Test_Node_TestSuite   $testSuite   — 

[ Top ]

getSummary   [line 139]

array getSummary( PHPUnit2_Framework_TestResult $result)

Returns summarized Code Coverage data.

Format of the result array:

  1.  array(
  2.    "/tested/code.php" => array(
  3.      linenumber => number of tests that executed the line
  4.    )
  5.  )

  • Since: Method available since Release 2.2.0
  • Access: protected

Parameters:

PHPUnit2_Framework_TestResult   $result   — 

[ Top ]

reducePaths   [line 286]

string reducePaths( &$files, array $files)

Reduces the paths by cutting the longest common start path.

For instance,

  1.  Array
  2.  (
  3.      [/home/sb/PHPUnit2/Samples/Money/Money.php=> Array
  4.          (
  5.              ...
  6.          )
  7.  
  8.      [/home/sb/PHPUnit2/Samples/Money/MoneyBag.php=> Array
  9.          (
  10.              ...
  11.          )
  12.  )

is reduced to

  1.  Array
  2.  (
  3.      [Money.php=> Array
  4.          (
  5.              ...
  6.          )
  7.  
  8.      [MoneyBag.php=> Array
  9.          (
  10.              ...
  11.          )
  12.  )

  • Access: protected

Parameters:

array   $files   — 
   &$files   — 

[ Top ]


Documentation generated on Mon, 11 Mar 2019 14:40:38 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.