附录 D. 索引

符号

$backupGlobalsBlacklist,全局状态
$backupStaticAttributesBlacklist,全局状态
@author,命令行选项@author
@backupGlobals,全局状态@backupGlobals
@backupStaticAttributes,全局状态@backupStaticAttributes
@codeCoverageIgnore,略过代码块@codeCoverageIgnore*
@codeCoverageIgnoreEnd,略过代码块@codeCoverageIgnore*
@codeCoverageIgnoreStart,略过代码块@codeCoverageIgnore*
@covers,指明要覆盖的方法@covers
@coversDefaultClass,@coversDefaultClass
@coversNothing,指明要覆盖的方法@coversNothing
@dataProvider,数据供给器@dataProvider
@depends,测试的依赖关系数据供给器@depends
@expectedException,对异常进行测试@expectedException
@expectedExceptionCode,@expectedExceptionCode
@expectedExceptionMessage,@expectedExceptionMessage
@expectedExceptionMessageRegExp,@expectedExceptionMessageRegExp
@group,命令行选项@group
@large,@large
@medium,@medium
@preserveGlobalState,@preserveGlobalState
@requires,@requires
@runInSeparateProcess,@runInSeparateProcess
@runTestsInSeparateProcesses,@runTestsInSeparateProcesses
@small,@small
@test,编写 PHPUnit 测试@test
@testdox,@testdox
@ticket,@ticket
@uses,@uses
变更风险反模式(CRAP)指数(Change Risk Anti-Patterns (CRAP) Index),用于代码覆盖率的软件衡量标准
异常,对异常进行测试
敏捷文档,命令行选项敏捷文档
测试的依赖关系,测试的依赖关系

A

Annotation (标注),编写 PHPUnit 测试测试的依赖关系数据供给器对异常进行测试命令行选项略过代码块指明要覆盖的方法标注
anything(),assertThat()
arrayHasKey(),assertThat()
assertArrayHasKey(),assertArrayHasKey()
assertArrayNotHasKey(),assertArrayHasKey()
assertArraySubset(),assertArraySubset()
assertAttributeContains(),assertContains()
assertAttributeContainsOnly(),assertContainsOnly()
assertAttributeEmpty(),assertEmpty()
assertAttributeEquals(),assertEquals()
assertAttributeGreaterThan(),assertGreaterThan()
assertAttributeGreaterThanOrEqual(),assertGreaterThanOrEqual()
assertAttributeInstanceOf(),assertInstanceOf()
assertAttributeInternalType(),assertInternalType()
assertAttributeLessThan(),assertLessThan()
assertAttributeLessThanOrEqual(),assertLessThanOrEqual()
assertAttributeNotContains(),assertContains()
assertAttributeNotContainsOnly(),assertContainsOnly()
assertAttributeNotEmpty(),assertEmpty()
assertAttributeNotEquals(),assertEquals()
assertAttributeNotInstanceOf(),assertInstanceOf()
assertAttributeNotInternalType(),assertInternalType()
assertAttributeNotSame(),assertSame()
assertAttributeSame(),assertSame()
assertClassHasAttribute(),assertClassHasAttribute()
assertClassHasStaticAttribute(),assertClassHasStaticAttribute()
assertClassNotHasAttribute(),assertClassHasAttribute()
assertClassNotHasStaticAttribute(),assertClassHasStaticAttribute()
assertContains(),assertContains()
assertContainsOnly(),assertContainsOnly()
assertContainsOnlyInstancesOf(),assertContainsOnlyInstancesOf()
assertCount(),assertCount()
assertDirectoryExists(),assertDirectoryExists()
assertDirectoryIsReadable(),assertDirectoryIsReadable()
assertDirectoryIsWritable(),assertDirectoryIsWritable()
assertDirectoryNotExists(),assertDirectoryExists()
assertDirectoryNotIsReadable(),assertDirectoryIsReadable()
assertDirectoryNotIsWritable(),assertDirectoryIsWritable()
assertEmpty(),assertEmpty()
assertEquals(),assertEquals()
assertEqualXMLStructure(),assertEqualXMLStructure()
assertFalse(),assertFalse()
assertFileEquals(),assertFileEquals()
assertFileExists(),assertFileExists()
assertFileIsReadable(),assertFileIsReadable()
assertFileIsWritable(),assertFileIsWritable()
assertFileNotEquals(),assertFileEquals()
assertFileNotExists(),assertFileExists()
assertFileNotIsReadable(),assertFileIsReadable()
assertFileNotIsWritable(),assertFileIsWritable()
assertFinite(),assertInfinite()
assertGreaterThan(),assertGreaterThan()
assertGreaterThanOrEqual(),assertGreaterThanOrEqual()
assertInfinite(),assertInfinite()
assertInstanceOf(),assertInstanceOf()
assertInternalType(),assertInternalType()
assertIsReadable(),assertIsReadable()
assertIsWritable(),assertIsWritable()
assertJsonFileEqualsJsonFile(),assertJsonFileEqualsJsonFile()
assertJsonFileNotEqualsJsonFile(),assertJsonFileEqualsJsonFile()
assertJsonStringEqualsJsonFile(),assertJsonStringEqualsJsonFile()
assertJsonStringEqualsJsonString(),assertJsonStringEqualsJsonString()
assertJsonStringNotEqualsJsonFile(),assertJsonStringEqualsJsonFile()
assertJsonStringNotEqualsJsonString(),assertJsonStringEqualsJsonString()
assertLessThan(),assertLessThan()
assertLessThanOrEqual(),assertLessThanOrEqual()
assertNan(),assertNan()
assertNotContains(),assertContains()
assertNotContainsOnly(),assertContainsOnly()
assertNotCount(),assertCount()
assertNotEmpty(),assertEmpty()
assertNotEquals(),assertEquals()
assertNotInstanceOf(),assertInstanceOf()
assertNotInternalType(),assertInternalType()
assertNotIsReadable(),assertIsReadable()
assertNotIsWritable(),assertIsWritable()
assertNotNull(),assertNull()
assertNotRegExp(),assertRegExp()
assertNotSame(),assertSame()
assertNull(),assertNull()
assertObjectHasAttribute(),assertObjectHasAttribute()
assertObjectNotHasAttribute(),assertObjectHasAttribute()
assertPostConditions(),基境(fixture)
assertPreConditions(),基境(fixture)
assertRegExp(),assertRegExp()
assertSame(),assertSame()
assertStringEndsNotWith(),assertStringEndsWith()
assertStringEndsWith(),assertStringEndsWith()
assertStringEqualsFile(),assertStringEqualsFile()
assertStringMatchesFormat(),assertStringMatchesFormat()
assertStringMatchesFormatFile(),assertStringMatchesFormatFile()
assertStringNotEqualsFile(),assertStringEqualsFile()
assertStringNotMatchesFormat(),assertStringMatchesFormat()
assertStringNotMatchesFormatFile(),assertStringMatchesFormatFile()
assertStringStartsNotWith(),assertStringStartsWith()
assertStringStartsWith(),assertStringStartsWith()
assertThat(),assertThat()
assertTrue(),assertTrue()
assertXmlFileEqualsXmlFile(),assertXmlFileEqualsXmlFile()
assertXmlFileNotEqualsXmlFile(),assertXmlFileEqualsXmlFile()
assertXmlStringEqualsXmlFile(),assertXmlStringEqualsXmlFile()
assertXmlStringEqualsXmlString(),assertXmlStringEqualsXmlString()
assertXmlStringNotEqualsXmlFile(),assertXmlStringEqualsXmlFile()
assertXmlStringNotEqualsXmlString(),assertXmlStringEqualsXmlString()
attribute(),assertThat()
attributeEqualTo(),assertThat()
Automated Documentation (自动文档),敏捷文档

C

classHasAttribute(),assertThat()
classHasStaticAttribute(),assertThat()
Code Coverage (代码覆盖率),命令行选项代码覆盖率分析@coversWhitelisting Files for Code Coverage
Branch Coverage (分支覆盖率),用于代码覆盖率的软件衡量标准
Class and Trait Coverage (类与特质覆盖率),用于代码覆盖率的软件衡量标准
Function and Method Coverage (函数与方法覆盖率),用于代码覆盖率的软件衡量标准
Line Coverage (行覆盖率),用于代码覆盖率的软件衡量标准
Opcode Coverage (Opcode 覆盖率),用于代码覆盖率的软件衡量标准
Path Coverage (路径覆盖率),用于代码覆盖率的软件衡量标准
Whitelist (白名单),将文件列入白名单
Configuration (配置),命令行选项
Constant (常量),设定 PHP INI 设置、常量、全局变量
contains(),assertThat()
containsOnly(),assertThat()
containsOnlyInstancesOf(),assertThat()
createMock(),Stubs (桩件)

D

Data-Driven Tests (数据驱动测试),实现 PHPUnit_Framework_Test
Defect Localization (缺陷定位),测试的依赖关系
Depended-On Component (依赖组件),测试替身
directoryExists(),assertThat()
Documenting Assumptions (将假设文档化),敏捷文档

E

equalTo(),assertThat()
Error Handler (错误处理),对 PHP 错误进行测试
Error (错误),命令行测试执行器
expectException(),对异常进行测试
expectExceptionCode(),对异常进行测试
expectExceptionMessage(),对异常进行测试
expectExceptionMessageRegExp(),对异常进行测试
Extreme Programming (极限编程),敏捷文档

F

Failure (失败),命令行测试执行器
fileExists(),assertThat()
Fixture (基境),基境(fixture)
Fluent Interface (流畅式接口),Stubs (桩件)

G

getMockBuilder(),仿件对象(Mock Object)
getMockForAbstractClass(),对特质(Trait)与抽象类进行模仿
getMockForTrait(),对特质(Trait)与抽象类进行模仿
getMockFromWsdl(),对 Web 服务(Web Services)进行上桩或模仿
Global Variable (全局变量),全局状态设定 PHP INI 设置、常量、全局变量
greaterThan(),assertThat()
greaterThanOrEqual(),assertThat()

H

hasAttribute(),assertThat()

I

identicalTo(),assertThat()
include_path,命令行选项
Incomplete Test (未完成的测试),未完成的测试
isFalse(),assertThat()
isInstanceOf(),assertThat()
isNull(),assertThat()
isReadable(),assertThat()
isTrue(),assertThat()
isType(),assertThat()
isWritable(),assertThat()

L

lessThan(),assertThat()
lessThanOrEqual(),assertThat()
Logfile (日志文件),命令行选项
Logging (日志记录),Logging (日志记录)Logging (日志记录)
logicalAnd(),assertThat()
logicalNot(),assertThat()
logicalOr(),assertThat()
logicalXor(),assertThat()

M

matchesRegularExpression(),assertThat()
method(),Stubs (桩件)
Mock Object (仿件对象),仿件对象(Mock Object)

O

onConsecutiveCalls(),Stubs (桩件)
onNotSuccessfulTest(),基境(fixture)

P

PHP Error (PHP 错误),对 PHP 错误进行测试
PHP Notice (PHP 通知),对 PHP 错误进行测试
PHP Warning (PHP 警告),对 PHP 错误进行测试
php.ini,设定 PHP INI 设置、常量、全局变量
PHPUnit\Framework\Error,对 PHP 错误进行测试
PHPUnit\Framework\Error\Notice,对 PHP 错误进行测试
PHPUnit\Framework\Error\Warning,对 PHP 错误进行测试
PHPUnit\Framework\TestCase,编写 PHPUnit 测试PHPUnit\Framework\TestCase 的子类
PHPUnit\Framework\TestListener,命令行选项实现 PHPUnit\Framework\TestListener测试监听器
PHPUnit_Extensions_RepeatedTest,从 PHPUnit_Extensions_TestDecorator 派生子类
PHPUnit_Extensions_TestDecorator,从 PHPUnit_Extensions_TestDecorator 派生子类
PHPUnit_Framework_BaseTestListener,实现 PHPUnit\Framework\TestListener
PHPUnit_Framework_IncompleteTest,未完成的测试
PHPUnit_Framework_IncompleteTestError,未完成的测试
PHPUnit_Framework_Test,实现 PHPUnit_Framework_Test
PHPUnit_Runner_TestSuiteLoader,命令行选项
PHPUnit_Util_Printer,命令行选项
PHP_Invoker,@large@medium@small
Process Isolation (进程隔离),命令行选项

R

Refactoring (重构),在开发过程中
Report (报告),命令行选项
returnArgument(),Stubs (桩件)
returnCallback(),Stubs (桩件)
returnSelf(),Stubs (桩件)
returnValueMap(),Stubs (桩件)

S

setUp(),基境(fixture)
setUpBeforeClass,基境共享
setUpBeforeClass(),基境(fixture)
stringContains(),assertThat()
stringEndsWith(),assertThat()
stringStartsWith(),assertThat()
Stub (桩件),Stubs (桩件)
Stubs (桩件),跨团队测试
System Under Test (被测系统),测试替身

T

tearDown(),基境(fixture)
tearDownAfterClass,基境共享
tearDownAfterClass(),基境(fixture)
Template Method (模板方法),基境(fixture)
Test Double (测试替身),测试替身
Test Groups (测试分组),命令行选项分组
Test Isolation (测试隔离),命令行选项全局状态
Test Listener (测试监听器),测试监听器
Test Suite (测试套件),组织测试测试套件
TestDox,敏捷文档@testdox
throwException(),Stubs (桩件)
timeoutForLargeTests,@large
timeoutForMediumTests,@medium
timeoutForSmallTests,@small

W

Whitelist (白名单),Whitelisting Files for Code Coverage
will(),Stubs (桩件)
willReturn(),Stubs (桩件)

X

Xdebug,代码覆盖率分析
XML Configuration (XML 配置),用 XML 配置来编排测试套件

原文: https://phpunit.de/manual/6.5/zh_cn/appendixes.index.html