Class TestHelpers is used to hold static functions required for testing

  • experimental
  • internal
CloneableInstantiable
Methods
public static generatedSystemTestBootstrap()
 

Setup stuff needed for the generated system tests.

  • internal
  • experimental
public static getPrivateProperty( $class, $property)
 

Get the value of a private property.

  • return mixed
public static impl( $trait, array $props = [])
 

Get a trait implementation.

  • return mixed
  • experimental
  • internal
public static perfBootstrap()
 

Setup performance tests support.

  • return void
  • experimental
  • internal
public static requireKeyfile( $env)
 

Check that the required environment variable keyfile paths are set and exist.

  • throws RuntimeException
  • experimental
  • internal
public static snippetBootstrap()
 

Setup snippet tests support.

  • return void
  • experimental
  • internal
public static stub( $extends, array $args = [], array $props = [])
 

Create a test stub which extends a real class and allows overriding of private properties.

  • return mixed
  • experimental
  • internal
public static systemBootstrap()
 

Setup stuff needed for the system test runner.

This method can only be called once per run. Subsequent calls will thrown \RuntimeException.

  • internal
  • experimental
public static systemTestShutdown(callable $shutdown)
 

Add cleanup function for system tests.

Calls to this method enqueue a PHP shutdown function, scoped to the parent
PID.

  • return void
  • experimental
  • internal
Methods
private static projectRoot()
 

Determine the path of the project root based on where the composer
autoloader is located.

  • return string
  • experimental
  • internal
Methods
public static generatedSystemTestBootstrap()
 

Setup stuff needed for the generated system tests.

  • internal
  • experimental
public static getPrivateProperty( $class, $property)
 

Get the value of a private property.

  • return mixed
public static impl( $trait, array $props = [])
 

Get a trait implementation.

  • return mixed
  • experimental
  • internal
public static perfBootstrap()
 

Setup performance tests support.

  • return void
  • experimental
  • internal
private static projectRoot()
 

Determine the path of the project root based on where the composer
autoloader is located.

  • return string
  • experimental
  • internal
public static requireKeyfile( $env)
 

Check that the required environment variable keyfile paths are set and exist.

  • throws RuntimeException
  • experimental
  • internal
public static snippetBootstrap()
 

Setup snippet tests support.

  • return void
  • experimental
  • internal
public static stub( $extends, array $args = [], array $props = [])
 

Create a test stub which extends a real class and allows overriding of private properties.

  • return mixed
  • experimental
  • internal
public static systemBootstrap()
 

Setup stuff needed for the system test runner.

This method can only be called once per run. Subsequent calls will thrown \RuntimeException.

  • internal
  • experimental
public static systemTestShutdown(callable $shutdown)
 

Add cleanup function for system tests.

Calls to this method enqueue a PHP shutdown function, scoped to the parent
PID.

  • return void
  • experimental
  • internal
© 2020 Bruce Wells
Search Namespaces \ Classes
ConfigurationNumbers (0-9.) only