TestCase
- Type
- Class
- Namespace
- craft\test
- Inherits
- craft\test\TestCase »
Codeception\Test\Unit
- Extended by
- craft\test\console\ConsoleTest, myprojecttests\ExampleUnitTest
- Since
- 3.2.0
Class TestCase
View source (opens new window)
# Public Methods
Method | Description |
---|---|
_fixtures() | |
assertObjectIsInstanceOfClassCallback() | Returns a callable that checks whether the passed in object is an instance of the $class param |
# _fixtures()
View source (opens new window)
Returns
# assertObjectIsInstanceOfClassCallback()
Returns a callable that checks whether the passed in object is an instance of the $class param
View source (opens new window)
Arguments
$class
(string (opens new window))
Returns
# Protected Methods
Method | Description |
---|---|
getInaccessibleProperty() | Gets an inaccessible object property. |
invokeMethod() | Invokes an inaccessible method on an object |
invokeStaticMethod() | Invokes an inaccessible static method on a class |
setInaccessibleProperty() | Sets an inaccessible object property to a designated value. |
# getInaccessibleProperty()
Gets an inaccessible object property.
View source (opens new window)
Arguments
$object
(object (opens new window), string (opens new window))$propertyName
(string (opens new window))$revoke
(boolean (opens new window)) – Whether to make property inaccessible after getting
Returns
mixed
Throws
# invokeMethod()
Invokes an inaccessible method on an object
View source (opens new window)
Arguments
$object
(object (opens new window), string (opens new window))$method
(string (opens new window))$args
(array (opens new window))$revoke
(boolean (opens new window)) – Whether to make method inaccessible after execution
Returns
mixed
Throws
# invokeStaticMethod()
Invokes an inaccessible static method on a class
View source (opens new window)
Arguments
$className
(object (opens new window), string (opens new window))$method
(string (opens new window))$args
(array (opens new window))$revoke
(boolean (opens new window)) – Whether to make method inaccessible after execution
Returns
mixed
Throws
# setInaccessibleProperty()
Sets an inaccessible object property to a designated value.
View source (opens new window)
Arguments
$object
(object (opens new window), string (opens new window))$propertyName
(string (opens new window))$value
(mixed
)$revoke
(boolean (opens new window)) – Whether to make property inaccessible after setting
Throws
← EventItem TestMailer →