本文整理汇总了PHP中PHPUnit_Framework_Assert::assertNotContains方法的典型用法代码示例。如果您正苦于以下问题:PHP PHPUnit_Framework_Assert::assertNotContains方法的具体用法?PHP PHPUnit_Framework_Assert::assertNotContains怎么用?PHP PHPUnit_Framework_Assert::assertNotContains使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PHPUnit_Framework_Assert
的用法示例。
在下文中一共展示了PHPUnit_Framework_Assert::assertNotContains方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: processAssert
/**
* Assert that deleted customers address is not displayed on backend during order creation.
*
* @param SalesOrderIndex $orderIndex
* @param SalesOrderCreateIndex $orderCreateIndex
* @param Address $deletedAddress
* @param Customer $customer
* @return void
*/
public function processAssert(SalesOrderIndex $orderIndex, SalesOrderCreateIndex $orderCreateIndex, Address $deletedAddress, Customer $customer)
{
$orderIndex->open()->getPageActionsBlock()->addNew();
$orderCreateIndex->getCustomerGrid()->selectCustomer($customer);
$orderCreateIndex->getStoreBlock()->selectStoreView();
\PHPUnit_Framework_Assert::assertNotContains($this->prepareAddress($deletedAddress), $orderCreateIndex->getCreateBlock()->getBillingAddressForm()->getExistingAddresses(), 'Deleted address is present on backend during order creation');
}
示例2: theFieldShouldNotHaveAnErrorContaining
/**
* @Then the field :name should not have an error containing :message
*/
public function theFieldShouldNotHaveAnErrorContaining($name, $message)
{
$field = $this->assertSession()->fieldExists($name);
$parent = $field->getParent();
if (false === stripos($parent->getAttribute('class'), $this->fieldContainerClass)) {
$parent = $parent->getParent();
}
Assert::assertNotContains($message, $parent->getText());
}
示例3: processAssert
/**
* Assert that created CMS block non visible on frontend category page.
*
* @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('catalogCategory', ['dataSet' => 'default_subcategory', 'data' => ['display_mode' => 'Static block and products', 'landing_page' => $cmsBlock->getTitle()]]);
$category->persist();
$cmsIndex->open();
$cmsIndex->getTopmenu()->selectCategory($category->getName());
$categoryViewContent = $catalogCategoryView->getViewBlock()->getText();
$cmsBlockContent = explode("\n", $categoryViewContent);
\PHPUnit_Framework_Assert::assertNotContains($cmsBlock->getContent(), $cmsBlockContent);
}
示例4: responseShouldContain
/**
* @Given /^response should (?P<not>|not )contain "([^"]*)"$/
*/
public function responseShouldContain($not = '', $expectedValue)
{
$shouldNotExist = !empty($not);
$value = $this->decodeJson($this->lastResponse->getContent());
$value = is_array($value) ? array_keys($value) : $value;
if ($shouldNotExist) {
\PHPUnit_Framework_Assert::assertNotContains($expectedValue, $value);
} else {
\PHPUnit_Framework_Assert::assertContains($expectedValue, $value);
}
}
示例5: setStatusTestingApp
protected function setStatusTestingApp($enabled)
{
$this->sendingTo($enabled ? 'post' : 'delete', '/cloud/apps/testing');
$this->theHTTPStatusCodeShouldBe('200');
$this->theOCSStatusCodeShouldBe('100');
$this->sendingTo('get', '/cloud/apps?filter=enabled');
$this->theHTTPStatusCodeShouldBe('200');
if ($enabled) {
PHPUnit_Framework_Assert::assertContains('testing', $this->response->getBody()->getContents());
} else {
PHPUnit_Framework_Assert::assertNotContains('testing', $this->response->getBody()->getContents());
}
}
示例6: assertNotContains
/**
* Asserts that a haystack does not contain a needle.
*
* @param mixed $needle
* @param mixed $haystack
* @param string $message
* @param boolean $ignoreCase
* @param boolean $checkForObjectIdentity
* @since Method available since Release 2.1.0
*/
function assertNotContains($needle, $haystack, $message = '', $ignoreCase = FALSE, $checkForObjectIdentity = TRUE)
{
return PHPUnit_Framework_Assert::assertNotContains($needle, $haystack, $message, $ignoreCase, $checkForObjectIdentity);
}
示例7: doesNotContain
public function doesNotContain($needle)
{
Assert::assertNotContains($needle, $this->actual, $this->description);
return $this;
}
示例8: userIsNotSubadminOfGroup
/**
* @Given /^user "([^"]*)" is not a subadmin of group "([^"]*)"$/
* @param string $user
* @param string $group
*/
public function userIsNotSubadminOfGroup($user, $group)
{
$fullUrl = $this->baseUrl . "v2.php/cloud/groups/{$group}/subadmins";
$client = new Client();
$options = [];
if ($this->currentUser === 'admin') {
$options['auth'] = $this->adminUser;
}
$this->response = $client->get($fullUrl, $options);
$respondedArray = $this->getArrayOfSubadminsResponded($this->response);
sort($respondedArray);
PHPUnit_Framework_Assert::assertNotContains($user, $respondedArray);
PHPUnit_Framework_Assert::assertEquals(200, $this->response->getStatusCode());
}
示例9: dontSeeInThisFile
/**
* Checks If opened file doesn't contain `text` in it
*
* ``` php
* <?php
* $I->openFile('composer.json');
* $I->seeInThisFile('codeception/codeception');
* ?>
* ```
*
* @param $text
*/
public function dontSeeInThisFile($text)
{
\PHPUnit_Framework_Assert::assertNotContains($text, $this->file, "text {$text} in currently opened file");
}
示例10: dontSeeFileFound
/**
* Checks if file does not exists in path on the remote FTP/SFTP system
*
* @param $filename
* @param string $path
*/
public function dontSeeFileFound($filename, $path = '')
{
$files = $this->grabFileList($path);
$this->debug("don't see file: {$filename}");
\PHPUnit_Framework_Assert::assertNotContains($filename, $files);
}
示例11: dontSeeResultContains
/**
* Checks that the result of the last execution doesn't contain a value.
*
* @param $value
* @deprecated
*/
public function dontSeeResultContains($value)
{
\PHPUnit_Framework_Assert::assertNotContains($value, $this->last_result);
}
示例12: assert_string_not_present
public function assert_string_not_present($expected_missing_string, $message)
{
$page_text = $this->get_text();
PHPUnit_Framework_Assert::assertNotContains($expected_missing_string, $page_text, $message);
}
示例13: toContain
public function toContain($needle)
{
if ($this->negate) {
a::assertNotContains($needle, $this->actual);
} else {
a::assertContains($needle, $this->actual);
}
}
示例14: iShouldNotSeeInTheCommandOutput
/**
* @Then /^I should not see "([^"]*)" in the command output$/
*/
public function iShouldNotSeeInTheCommandOutput($pattern)
{
PHPUnit_Framework_Assert::assertNotContains($pattern, $this->process->getOutput());
}
示例15: iShouldNotSeeTheFollowing
/**
* @Then /^I should not see the following:$/
*/
public function iShouldNotSeeTheFollowing(PyStringNode $string)
{
$output = $this->getOutput();
\PHPUnit_Framework_Assert::assertNotContains($string->getRaw(), $output);
}