vs code phpunit snippets
1.0.0
VSCode 的 PHPUnit 片段
片段列表
assertArrayHasKey()
assertAttributeEquals()
assertClassHasAttribute()
assertClassHasStaticAttribute()
assertContains()
assertContainsOnly()
assertCount()
assertEquals()
assertEmpty()
assertEqualXMLStructure()
assertFalse()
assertFileEquals()
assertFileExists()
assertGreatherThan()
assertGreaterThanOrEqual()
assertInstanceOf()
assertInternalType()
assertLessThan()
assertLessThanOrEqual()
assertNotNull()
assertNull()
assertObjectHasAttribute()
assertRegExp()
assertSame()
assertSelectCount()
assertSelectEquals()
assertStringEqualsFile()
assertStringEndsWith()
assertStringMatchesFormat()
assertStringMatchesFormatFile()
assertSelectRegExp()
assertStringStartsWith()
assertTrue()
assertTag()
assertXmlFileEqualsXmlFile()
assertXmlStringEqualsXmlFile()
assertXmlStringEqualsXmlString()
设置
public function setUp()
{
// set up
}
拆解
public function tearDown()
{
// tear down
}
测试
/**
* @covers [Class]::[Method]()
*/
public function test[Method]()
{
// assertions
}
测试2
/**
* @covers [Class]::[Method1]()
* @covers [Class]::[Method2]()
*/
public function test[Method1]_[Method2]()
{
// assertions
}
测试克斯
/**
* @covers [Class]::[Method]()
* @expectedException [Exception]
*/
public function test[Method]()
{
// assertions
}
睾丸
/**
* @covers [Class]::[Method]()
*/
public function test[Method]()
{
$this->markTestIncomplete('Not yet implemented');
}
享受!