当前位置: 首页>>代码示例>>PHP>>正文


PHP PHPUnit_Framework_Assert::assertNotTrue方法代码示例

本文整理汇总了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);
     }
 }
开发者ID:jasonmccreary,项目名称:expect,代码行数:8,代码来源:Expect.php

示例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);
 }
开发者ID:manishkiozen,项目名称:Cms,代码行数:8,代码来源:FeatureContext.php

示例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;
 }
开发者ID:jpkleemans,项目名称:phpunit-expect,代码行数:12,代码来源:Expect.php

示例4: isNotTrue

 public function isNotTrue()
 {
     Assert::assertNotTrue($this->actual, $this->description);
     return $this;
 }
开发者ID:dekeysoft,项目名称:pu-tester,代码行数:5,代码来源:BooleanMatcher.php

示例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});
 }
开发者ID:jeremygiberson,项目名称:js2doctrine,代码行数:14,代码来源:FeatureContext.php

示例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);
 }
开发者ID:szwork2013,项目名称:impulse,代码行数:23,代码来源:UserServicePDOTest.php


注:本文中的PHPUnit_Framework_Assert::assertNotTrue方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。