本文整理汇总了PHP中PHPUnit_Framework_TestCase::assertEmpty方法的典型用法代码示例。如果您正苦于以下问题:PHP PHPUnit_Framework_TestCase::assertEmpty方法的具体用法?PHP PHPUnit_Framework_TestCase::assertEmpty怎么用?PHP PHPUnit_Framework_TestCase::assertEmpty使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PHPUnit_Framework_TestCase
的用法示例。
在下文中一共展示了PHPUnit_Framework_TestCase::assertEmpty方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: doDelete
protected function doDelete(RecordInterface $record, Version $version)
{
$this->testCase->assertEquals(8, $this->pathParameters->getProperty('fooId'));
$this->testCase->assertEmpty($this->pathParameters->getProperty('bar'));
$this->testCase->assertEquals(1, $record->getId());
return array('success' => true, 'message' => 'You have successful delete a record');
}
示例2: assertEmpty
/**
* Calls assertEmpty() or assertThat() depending on the PHPUnit version.
* Available from PHPUnit >= 3.5
*
* @param mixed $actual Actual value
* @param string $message Message to print if assertion is wrong
*/
public static function assertEmpty($actual, $message = '')
{
if (self::_checkMethod('assertEmpty')) {
parent::assertEmpty($actual, $message);
} else {
parent::assertThat($actual, parent::isEmpty(), $message);
}
}
示例3: assertEmpty
/**
* Provide assertEmpty() in PHPUnit <3.5.
* We want to support PHPUnit 3.4, as this is the most recent release available
* to environments running PHP <=5.2.6, such as Debian Lenny.
*/
public static function assertEmpty($item, $message = '') {
if(class_exists('PHPUnit_Framework_Constraint_IsEmpty')) {
parent::assertEmpty($item, $message);
} else {
if(!empty($item)) {
$message = $message ? $message : "Failed asserting that " . var_export($item, true) . " is empty.";
throw new PHPUnit_Framework_AssertionFailedError($message);
}
}
}
示例4: emptyProcessors
/**
* @test
*/
public function emptyProcessors()
{
$processors = $this->processorContainer->getProcessors();
parent::assertInstanceOf(\Traversable::class, $processors);
parent::assertEmpty($processors);
}
示例5: emptyHandlers
/**
* @test
*/
public function emptyHandlers()
{
$handlers = $this->handlerContainer->getHandlers();
parent::assertInstanceOf(\Traversable::class, $handlers);
parent::assertEmpty($handlers);
}