\Ke\TestUtilsTestAnnotationHelperTrait

注解辅助测试工具(Trait)

Summary

Methods
Properties
Constants
newTestMethod()
getAnnotationTestMethods()
getLastAnnotationTestMethod()
No public properties found
No constants found
getTestMethodsFromDebugTrace()
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

newTestMethod()

newTestMethod(\Ke\TestUtils\string  $method) 

Parameters

\Ke\TestUtils\string $method

getAnnotationTestMethods()

getAnnotationTestMethods() : array

获得调用该方法时的方法注解测试方法,如果包含多个方法,将返回一个数组

目前只是一个简单实现,请勿过度基于此方法进行封装,仅仅只为了简化单元测试的书写

Returns

array

getLastAnnotationTestMethod()

getLastAnnotationTestMethod() : \Ke\TestUtils\TestMethod

获取调用该方法时注解中的最后一个测试方法实例

目前只是一个简单实现,请勿过度基于此方法进行封装,仅仅只为了简化单元测试的书写

Throws

\Ke\TestUtils\TestMethodException

Returns

\Ke\TestUtils\TestMethod

getTestMethodsFromDebugTrace()

getTestMethodsFromDebugTrace(integer  $index) : array

从debug trace中取出被调用时的方法注释文档中所包含的testMethod的测试方法

Parameters

integer $index

Returns

array