本文整理汇总了PHP中PHPUnit_Framework_Assert::assertObjectNotHasAttribute方法的典型用法代码示例。如果您正苦于以下问题:PHP PHPUnit_Framework_Assert::assertObjectNotHasAttribute方法的具体用法?PHP PHPUnit_Framework_Assert::assertObjectNotHasAttribute怎么用?PHP PHPUnit_Framework_Assert::assertObjectNotHasAttribute使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PHPUnit_Framework_Assert
的用法示例。
在下文中一共展示了PHPUnit_Framework_Assert::assertObjectNotHasAttribute方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testCreate
public function testCreate()
{
$directory = new FooDirectory($this->getMongoDB());
$model = $directory->create(['memoryOnly' => 'yes']);
PHPUnit::assertObjectNotHasAttribute('_id', $model);
PHPUnit::assertEquals('yes', $model['memoryOnly']);
}
示例2: assertObjectNotHasAttribute
/**
* Asserts that an object does not have a specified attribute.
*
* @param string $attributeName
* @param object $object
* @param string $message
* @since Method available since Release 3.0.0
*/
function assertObjectNotHasAttribute($attributeName, $object, $message = '')
{
return PHPUnit_Framework_Assert::assertObjectNotHasAttribute($attributeName, $object, $message);
}
示例3: notHasAttribute
public function notHasAttribute($attribute)
{
if (is_string($attribute)) {
a::assertClassNotHasAttribute($attribute, $this->actual, $this->description);
} else {
a::assertObjectNotHasAttribute($attribute, $this->actual, $this->description);
}
}
示例4: notToHaveAttribute
/**
* Expect that a class or an object does not have a specified attribute.
*
* @param string $attributeName
* @param string $message
*
* @return Expect
*/
public function notToHaveAttribute($attributeName, $message = '')
{
if (is_string($this->value)) {
// class
Assert::assertClassNotHasAttribute($attributeName, $this->value, $message);
} else {
// object
Assert::assertObjectNotHasAttribute($attributeName, $this->value, $message);
}
return $this;
}
示例5: toNotHaveAttribute
public function toNotHaveAttribute($attributeName)
{
\PHPUnit_Framework_Assert::assertObjectNotHasAttribute($attributeName, $this->actual);
}
示例6: doesNotHaveAttribute
public function doesNotHaveAttribute($attribute)
{
Assert::assertObjectNotHasAttribute($attribute, $this->actual, $this->description);
return $this;
}