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


PHP PHPUnit_Framework_Assert::assertNotRegExp方法代码示例

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


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

示例1: noEntryExists

 /**
  * @Given No entry was set
  */
 public function noEntryExists()
 {
     $sitemap = $this->app['sitemap']->generate(false);
     PHPUnit_Framework_Assert::assertNotRegExp('/\\<url\\>/', $sitemap);
 }
开发者ID:sebastian-marinescu,项目名称:silex-sitemap-service-provider,代码行数:8,代码来源:FeatureContext.php

示例2: assertNotRegExp

 /**
  * Checks that string not match with pattern
  *
  * @param string $pattern
  * @param string $string
  * @param string $message
  */
 protected function assertNotRegExp($pattern, $string, $message = '')
 {
     \PHPUnit_Framework_Assert::assertNotRegExp($pattern, $string, $message);
 }
开发者ID:hitechdk,项目名称:Codeception,代码行数:11,代码来源:Asserts.php

示例3: assertNotRegExp

/**
 * Asserts that a string does not match a given regular expression.
 *
 * @param  string $pattern
 * @param  string $string
 * @param  string $message
 * @since  Method available since Release 2.1.0
 */
function assertNotRegExp($pattern, $string, $message = '')
{
    return PHPUnit_Framework_Assert::assertNotRegExp($pattern, $string, $message);
}
开发者ID:delkyd,项目名称:sugarcrm_dev,代码行数:12,代码来源:Functions.php

示例4: dontSeeCurrentUrlMatches

 public function dontSeeCurrentUrlMatches($uri)
 {
     \PHPUnit_Framework_Assert::assertNotRegExp($uri, $this->_getCurrentUri());
 }
开发者ID:Eli-TW,项目名称:Codeception,代码行数:4,代码来源:InnerBrowser.php

示例5: assertCommand

 protected function assertCommand($command, $arguments, $info)
 {
     $method = $info['originalMethod'];
     $result = $this->__call($method, $arguments);
     if ($info['isBoolean']) {
         if (!isset($info['negative']) || !$info['negative']) {
             PHPUnit_Framework_Assert::assertTrue($result);
         } else {
             PHPUnit_Framework_Assert::assertFalse($result);
         }
     } else {
         $expected = array_pop($arguments);
         if (strpos($expected, 'exact:') === 0) {
             $expected = substr($expected, strlen('exact:'));
             if (!isset($info['negative']) || !$info['negative']) {
                 PHPUnit_Framework_Assert::assertEquals($expected, $result);
             } else {
                 PHPUnit_Framework_Assert::assertNotEquals($expected, $result);
             }
         } else {
             if (strpos($expected, 'regexp:') === 0) {
                 $expected = substr($expected, strlen('regexp:'));
             } else {
                 if (strpos($expected, 'glob:') === 0) {
                     $expected = substr($expected, strlen('glob:'));
                 }
                 $expected = str_replace(array('*', '?'), array('.*', '.?'), $expected);
             }
             $expected = str_replace('/', '\\/', $expected);
             if (!isset($info['negative']) || !$info['negative']) {
                 PHPUnit_Framework_Assert::assertRegExp('/' . $expected . '/', $result);
             } else {
                 PHPUnit_Framework_Assert::assertNotRegExp('/' . $expected . '/', $result);
             }
         }
     }
 }
开发者ID:febryantosulistyo,项目名称:ClassicSocial,代码行数:37,代码来源:Driver.php

示例6: theResponseShouldNotContain

 /**
  * Checks that response body doesn't contains specific text.
  *
  * @param string $text
  *
  * @Then /^(?:the )?response should not contain "([^"]*)"$/
  */
 public function theResponseShouldNotContain($text)
 {
     $expectedRegexp = '/' . preg_quote($text) . '/';
     $actual = (string) $this->response->getBody();
     Assertions::assertNotRegExp($expectedRegexp, $actual);
 }
开发者ID:pavelsmolka,项目名称:WebApiExtension,代码行数:13,代码来源:WebApiContext.php

示例7: assertCommand

 protected function assertCommand($command, $arguments, $info)
 {
     $method = $info['originalMethod'];
     $requiresTarget = $info['requiresTarget'];
     $result = $this->__call($method, $arguments);
     if ($info['isBoolean']) {
         if (!isset($info['negative']) || !$info['negative']) {
             PHPUnit_Framework_Assert::assertTrue($result, $arguments[count($arguments) - 1]);
         } else {
             PHPUnit_Framework_Assert::assertFalse($result, $arguments[count($arguments) - 1]);
         }
     } else {
         if ($requiresTarget === TRUE) {
             $expected = $arguments[1];
         } else {
             $expected = $arguments[0];
         }
         if (strpos($expected, 'exact:') === 0) {
             $expected = substr($expected, strlen('exact:'));
             if (!isset($info['negative']) || !$info['negative']) {
                 PHPUnit_Framework_Assert::assertEquals($expected, $result);
             } else {
                 PHPUnit_Framework_Assert::assertNotEquals($expected, $result);
             }
         } else {
             $caseInsensitive = FALSE;
             if (strpos($expected, 'regexp:') === 0) {
                 $expected = substr($expected, strlen('regexp:'));
             } else {
                 if (strpos($expected, 'regexpi:') === 0) {
                     $expected = substr($expected, strlen('regexpi:'));
                     $caseInsensitive = TRUE;
                 } else {
                     if (strpos($expected, 'glob:') === 0) {
                         $expected = substr($expected, strlen('glob:'));
                     }
                     $expected = str_replace(array('*', '?'), array('.*', '.?'), $expected);
                 }
             }
             $expected = '/' . str_replace('/', '\\/', $expected) . '/';
             if ($caseInsensitive) {
                 $expected .= 'i';
             }
             if (!isset($info['negative']) || !$info['negative']) {
                 PHPUnit_Framework_Assert::assertRegExp($expected, $result);
             } else {
                 PHPUnit_Framework_Assert::assertNotRegExp($expected, $result);
             }
         }
     }
 }
开发者ID:nbalonso,项目名称:MunkiFace,代码行数:51,代码来源:Driver.php

示例8: toMatchPattern

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

示例9: notToMatchRegExp

 /**
  * Expect that a string does not match a given regular expression.
  *
  * @param string $pattern
  * @param string $message
  *
  * @return Expect
  */
 public function notToMatchRegExp($pattern, $message = '')
 {
     Assert::assertNotRegExp($pattern, $this->value, $message);
     return $this;
 }
开发者ID:jpkleemans,项目名称:phpunit-expect,代码行数:13,代码来源:Expect.php

示例10: theResponseShouldNotContain

 /**
  * Checks that response body doesn't contains specific text.
  *
  * @param string $text
  *
  * @Then /^(?:the )?response should not contain "([^"]*)"$/
  */
 public function theResponseShouldNotContain($text)
 {
     \PHPUnit_Framework_Assert::assertNotRegExp('/' . preg_quote($text) . '/', $this->browser->getLastResponse()->getContent());
 }
开发者ID:kslimani,项目名称:CommonContexts,代码行数:11,代码来源:WebApiContext.php


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