本文整理汇总了PHP中PHPUnit_Framework_Assert::assertNotTrue方法的典型用法代码示例。如果您正苦于以下问题:PHP PHPUnit_Framework_Assert::assertNotTrue方法的具体用法?PHP PHPUnit_Framework_Assert::assertNotTrue怎么用?PHP PHPUnit_Framework_Assert::assertNotTrue使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PHPUnit_Framework_Assert
的用法示例。
在下文中一共展示了PHPUnit_Framework_Assert::assertNotTrue方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: toBeTrue
public function toBeTrue()
{
if ($this->negate) {
a::assertNotTrue($this->actual);
} else {
a::assertTrue($this->actual);
}
}
示例2: theDefaultCarrierShouldBeChanged
/**
* @Then the default carrier should be changed
*/
public function theDefaultCarrierShouldBeChanged()
{
PHPUnit_Framework_Assert::assertNotTrue((bool) $this->currentCarrier()->is_default_carrier);
PHPUnit_Framework_Assert::assertTrue((bool) $this->anotherCarrier()->is_default_carrier);
}
示例3: notToBeTrue
/**
* Expect that a condition is not true.
*
* @param string $message
*
* @return Expect
*/
public function notToBeTrue($message = '')
{
Assert::assertNotTrue($this->value, $message);
return $this;
}
示例4: isNotTrue
public function isNotTrue()
{
Assert::assertNotTrue($this->actual, $this->description);
return $this;
}
示例5: theAttributeIsNot
/**
* @Given /^the "([^"]*)" attribute "([^"]*)" is not "([^"]*)"$/
*/
public function theAttributeIsNot($shortName, $attribute, $annotationProperty)
{
$class = $this->generator->getNamespace() . "\\" . $shortName;
$reflection = new ReflectionClass($class);
PHPUnit::assertTrue($reflection->hasProperty($attribute));
$property = $reflection->getProperty($attribute);
$reader = new AnnotationReader();
/** @var Column $columnAnnotation */
$columnAnnotation = $reader->getPropertyAnnotation($property, Column::class);
PHPUnit::assertNotTrue($columnAnnotation->{$annotationProperty});
}
示例6: testUpdateUser
/**
* @depends testGetUser
*/
public function testUpdateUser($user)
{
$newUser = array('id' => $user['id'], 'firstName' => 'testguyFirstName', 'lastName' => 'testguyLastName', 'organization' => 'updatedTestOrg', 'email' => 'testguy@email.com', 'password' => 'changedPassword', 'sysuser' => 1, 'enabled' => 1);
self::$pdo->update(self::USER_ID, $newUser);
$retUser = self::$pdo->get(self::USER_ID);
PHPUnit_Framework_Assert::assertEquals('updatedTestOrg', $retUser['organization']);
// Validate Updated Password Test
$validated = self::$pdo->validateUser(self::USER_ID, 'changedPassword');
PHPUnit_Framework_Assert::assertTrue($validated);
$validated = self::$pdo->validateUser(self::USER_ID, 'testguy1234');
PHPUnit_Framework_Assert::assertNotTrue($validated);
// Validate Update with no password parameter in user
unset($newUser['password']);
$newUser['organization'] = 'testOrganization';
self::$pdo->update(self::USER_ID, $newUser);
$retUser = self::$pdo->get(self::USER_ID);
PHPUnit_Framework_Assert::assertEquals('testOrganization', $retUser['organization']);
$validated = self::$pdo->validateUser(self::USER_ID, 'changedPassword');
PHPUnit_Framework_Assert::assertTrue($validated);
}