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


PHP PHPUnit_Framework_Assert::assertNotEquals方法代码示例

本文整理汇总了PHP中PHPUnit_Framework_Assert::assertNotEquals方法的典型用法代码示例。如果您正苦于以下问题:PHP PHPUnit_Framework_Assert::assertNotEquals方法的具体用法?PHP PHPUnit_Framework_Assert::assertNotEquals怎么用?PHP PHPUnit_Framework_Assert::assertNotEquals使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PHPUnit_Framework_Assert的用法示例。


在下文中一共展示了PHPUnit_Framework_Assert::assertNotEquals方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: toEqual

 public function toEqual($expected)
 {
     if ($this->negate) {
         a::assertNotEquals($expected, $this->actual);
     } else {
         a::assertEquals($expected, $this->actual);
     }
 }
开发者ID:jasonmccreary,项目名称:expect,代码行数:8,代码来源:Expect.php

示例2: notEquals

 public function notEquals($expected)
 {
     if (!$this->isFileExpectation) {
         a::assertNotEquals($expected, $this->actual, $this->description);
     } else {
         a::assertFileNotEquals($expected, $this->actual, $this->description);
     }
 }
开发者ID:jaschweder,项目名称:Verify,代码行数:8,代码来源:Verify.php

示例3: processAssert

 /**
  * Assert that created CMS block non visible on frontend category page
  * (in order to assign block to category: go to category page> Display settings> CMS Block)
  *
  * @param CmsIndex $cmsIndex
  * @param CmsBlock $cmsBlock
  * @param CatalogCategoryView $catalogCategoryView
  * @param FixtureFactory $fixtureFactory
  * @return void
  */
 public function processAssert(CmsIndex $cmsIndex, CmsBlock $cmsBlock, CatalogCategoryView $catalogCategoryView, FixtureFactory $fixtureFactory)
 {
     $category = $fixtureFactory->createByCode('category', ['dataset' => 'default_subcategory', 'data' => ['display_mode' => 'Static block and products', 'landing_page' => $cmsBlock->getTitle()]]);
     $category->persist();
     $cmsIndex->open();
     $cmsIndex->getTopmenu()->selectCategoryByName($category->getName());
     $categoryViewContent = $catalogCategoryView->getViewBlock()->getContent();
     \PHPUnit_Framework_Assert::assertNotEquals($cmsBlock->getContent(), $categoryViewContent, 'Wrong block content on category is displayed.');
 }
开发者ID:andrewhowdencom,项目名称:m2onk8s,代码行数:19,代码来源:AssertCmsBlockNotOnCategoryPage.php

示例4: testGetPublicKeyFromNode

 public function testGetPublicKeyFromNode()
 {
     $adapter = $this->getAdapter();
     $publicKey = $this->getPublicKey();
     Assert::assertNotEquals($publicKey, $adapter->getPublicKey());
     $data = new DOMDocument();
     $data->load(__DIR__ . '/_files/basic-doc-signed.xml');
     Assert::assertEquals($publicKey, $adapter->getPublicKey($data));
 }
开发者ID:leoclaro,项目名称:xmldsig,代码行数:9,代码来源:AdapterInterfaceTestTrait.php

示例5: assert

 /**
  * Assert that shopping cart subtotal not equals with grand total.
  *
  * @return void
  */
 protected function assert()
 {
     $subTotal = $this->checkoutCart->getTotalsBlock()->getSubtotal();
     $grandTotal = $this->checkoutCart->getTotalsBlock()->getGrandTotal();
     if ($this->checkoutCart->getTotalsBlock()->isVisibleShippingPriceBlock()) {
         $shippingPrice = $this->checkoutCart->getTotalsBlock()->getShippingPrice();
         $grandTotal = number_format($grandTotal - $shippingPrice, 2);
     }
     \PHPUnit_Framework_Assert::assertNotEquals($subTotal, $grandTotal, 'Shopping cart subtotal: \'' . $subTotal . '\' equals with grand total: \'' . $grandTotal . '\'');
 }
开发者ID:kidaa30,项目名称:magento2-platformsh,代码行数:15,代码来源:AssertCartPriceRuleConditionIsApplied.php

示例6: testPublishAlteredMessage

 public function testPublishAlteredMessage()
 {
     $args = ['Message' => $originalMessage = 'MyOriginalMessage'];
     $this->snsClient->method('__call')->with('publish')->willReturnCallback(function ($name, array $args) use($originalMessage) {
         $params = array_key_exists(0, $args) ? $args[0] : [];
         \PHPUnit_Framework_Assert::assertNotEquals($originalMessage, $params['Message']);
         return new Result();
     });
     $actual = $this->sut->publish($args);
     self::assertInstanceOf(Result::class, $actual);
 }
开发者ID:abacaphiliac,项目名称:aws-sdk-php-claim-check,代码行数:11,代码来源:SnsExtendedClientTest.php

示例7: testAddUser

 public function testAddUser()
 {
     // insert
     $user_repo = $this->app->make('App\\Repositories\\UserRepository');
     $created_user_model = $user_repo->create($this->app->make('\\UserHelper')->sampleDBVars());
     // load from repo
     $loaded_user_model = $user_repo->findByUuid($created_user_model['uuid']);
     PHPUnit::assertNotEmpty($loaded_user_model);
     PHPUnit::assertEquals($created_user_model['id'], $loaded_user_model['id']);
     PHPUnit::assertEquals('sample@tokenly.co', $loaded_user_model['email']);
     PHPUnit::assertNotEquals('foo', $loaded_user_model['password']);
 }
开发者ID:CryptArc,项目名称:xchain,代码行数:12,代码来源:UserRepositoryTest.php

示例8: test

 public function test()
 {
     $object = new UserDefault();
     $type = UserDefault::class;
     $metadata = new ObjectMetadata($object);
     PHPUnit::assertEquals($type, $metadata->getType());
     PHPUnit::assertNotEquals(10, $object->getId());
     $metadata->setValue($object, 'id', 10);
     PHPUnit::assertEquals(10, $object->getId());
     PHPUnit::assertEquals(new \ReflectionClass($object), $metadata->getReflectionClass());
     try {
         $metadata->getProperty('thisPropertyDoesNotExists', true);
         PHPUnit::fail('Must raise an exception');
     } catch (\RuntimeException $ex) {
     }
     $property = $metadata->getProperty('thisPropertyDoesNotExists');
     PHPUnit::assertNull($property);
     $properties = $metadata->getProperties();
     $type = $metadata->getType();
     $object = unserialize(serialize($metadata));
     PHPUnit::assertEquals($properties, $object->getProperties());
     PHPUnit::assertEquals($type, $object->getType());
     PHPUnit::assertEquals($metadata, $object);
 }
开发者ID:raptorlab,项目名称:veloci,代码行数:24,代码来源:ObjectMetadataTest.php

示例9: iDonTSeeResponseHeaderWithValue

 /**
  * Then I (?:don\'t|do not) see "<header>" header with "<value>" value
  */
 public function iDonTSeeResponseHeaderWithValue($header, $value)
 {
     Assertion::assertNotEquals($value, $this->restClient->getResponseHeader($header), "Unexpected '{$header}' header found with '{$this->restClient->getResponseHeader($header)}' value");
 }
开发者ID:brookinsconsulting,项目名称:ezecosystem,代码行数:7,代码来源:RestContext.php

示例10: processAssert

 /**
  * Assert that first item in grid is not the same on ascending and descending sorting
  *
  * @param array $sortingResults
  */
 public function processAssert(array $sortingResults)
 {
     foreach ($sortingResults as $columnName => $sortingResult) {
         \PHPUnit_Framework_Assert::assertNotEquals($sortingResult['firstIdAfterFirstSoring'], $sortingResult['firstIdAfterSecondSoring'], sprintf('Sorting for "%s" column have not changed the first item of grid!', $columnName));
     }
 }
开发者ID:andrewhowdencom,项目名称:m2onk8s,代码行数:11,代码来源:AssertGridSorting.php

示例11: theCommandShouldFail

 /**
  * @Then /^the command should fail$/
  */
 public function theCommandShouldFail()
 {
     $exitCode = $this->applicationTester->getLastExitCode();
     \PHPUnit_Framework_Assert::assertNotEquals(0, $exitCode, 'Command exited with code ' . $exitCode);
 }
开发者ID:hason,项目名称:phpcr-shell,代码行数:8,代码来源:ContextBase.php

示例12: dontSeeInField

 /**
  * Checks the value in field is not equal to value passed.
  * Field is searched by its id|name|label|value or CSS selector.
  *
  * @param $field
  * @param $value
  */
 public function dontSeeInField($field, $value)
 {
     $node = $this->session->getPage()->findField($field);
     if (!$node) {
         return \PHPUnit_Framework_Assert::fail(", field not found");
     }
     \PHPUnit_Framework_Assert::assertNotEquals($this->escape($value), $node->getValue());
 }
开发者ID:nike-17,项目名称:Codeception,代码行数:15,代码来源:Mink.php

示例13: thereShouldBeALinkTitledWithoutNoFollow

 /**
  * @Then there should be a link titled :title without "nofollow"
  */
 public function thereShouldBeALinkTitledWithoutNoFollow($title)
 {
     $element = $this->assertSession()->elementExists('css', sprintf('a:contains("%s")', $title));
     if (!$element->hasAttribute('rel')) {
         return;
     }
     Assert::assertNotEquals('nofollow', $element->getAttribute('rel'), 'The link\'s "rel" attribute should not match "nofollow"');
 }
开发者ID:treehouselabs,项目名称:behat-common,代码行数:11,代码来源:SeoContext.php

示例14: itShouldFail

 /**
  * Checks whether previously runned command failed|passed.
  *
  * @Then /^it should (fail|pass)$/
  *
  * @param   string  $success    "fail" or "pass"
  */
 public function itShouldFail($success)
 {
     if ('fail' === $success) {
         \PHPUnit_Framework_Assert::assertNotEquals(0, $this->return);
     } else {
         \PHPUnit_Framework_Assert::assertEquals(0, $this->return);
     }
 }
开发者ID:mansee8,项目名称:libraryweb-site,代码行数:15,代码来源:FeatureContext.php

示例15: dontSeeQueueHasTotalCount

 /**
  * Check if a queue/tube does NOT have a given total number of messages
  *
  * ```php
  * <?php
  *     $I->dontSeeQueueHasTotalCount('default', 10);
  * ?>
  * ```
  *
  * @param string $queue    Queue Name
  * @param int    $expected Number of messages expected
  */
 public function dontSeeQueueHasTotalCount($queue, $expected)
 {
     $count = $this->_getMessagesTotalCountOnQueue($queue);
     $this->debug("don't see queue has total count: queue [{$queue}] has [{$count}] messages");
     \PHPUnit_Framework_Assert::assertNotEquals($expected, $count);
 }
开发者ID:Eli-TW,项目名称:Codeception,代码行数:18,代码来源:Queue.php


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