TestCase

Type
Class
Namespace
craft\test
Inherits
craft\test\TestCase » Codeception\Test\Unit
Extended by
craft\test\console\ConsoleTest
Since
3.2.0

Class TestCase

View source

# Public Methods

Method Description
assertObjectIsInstanceOfClassCallback() Returns a callback/Closure that checks whether the passed in object is an instance of the $class param

# assertObjectIsInstanceOfClassCallback()

Returns a callback/Closure that checks whether the passed in object is an instance of the $class param

View source

Arguments

Returns

Closure

# Protected Methods

Method Description
getInaccessibleProperty() Gets an inaccessible object property.
invokeMethod() Invokes a inaccessible method.
setInaccessibleProperty() Sets an inaccessible object property to a designated value.

# getInaccessibleProperty()

Gets an inaccessible object property.

View source

Arguments

  • $object
  • $propertyName
  • $revoke (boolean) – Whether to make property inaccessible after getting

Returns

mixed

Throws

# invokeMethod()

Invokes a inaccessible method.

View source

Arguments

  • $object
  • $method
  • $args (array)
  • $revoke (boolean) – Whether to make method inaccessible after execution

Returns

mixed

Throws

# setInaccessibleProperty()

Sets an inaccessible object property to a designated value.

View source

Arguments

  • $object
  • $propertyName
  • $value
  • $revoke (boolean) – Whether to make property inaccessible after setting

Throws