本文整理汇总了PHP中Codeception\Util\Fixtures类的典型用法代码示例。如果您正苦于以下问题:PHP Fixtures类的具体用法?PHP Fixtures怎么用?PHP Fixtures使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Fixtures类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: foreach
public function topページ_初期表示(\AcceptanceTester $I)
{
$I->wantTo('EF0101-UC01-T01 TOPページ 初期表示');
$I->amOnPage('/');
// カテゴリ選択ボックス(キーワード検索用)、キーワード検索入力欄、虫眼鏡ボタンが表示されている
$I->see('全ての商品', '#search #category_id');
$I->see('', '#search #name');
$I->see('', '#search .bt_search');
// カテゴリ名(カテゴリ検索用)が表示されている
$categories = Fixtures::get('categories');
foreach ($categories as $category) {
$I->see($category->getName(), '#search #category_id option');
}
//管理側のコンテンツ管理(新着情報管理)に設定されている情報が、順位順に表示されている
$today = new DateTime();
$minus1 = $today->sub(new DateInterval('P1D'));
$minus2 = $today->sub(new DateInterval('P2D'));
$I->haveInDatabase('dtb_news', array('news_id' => rand(999, 9999), 'news_date' => $minus1->format('Y-m-d 00:00:00'), 'news_title' => 'タイトル1', 'news_comment' => 'コメント1', 'creator_id' => 1, 'rank' => 2, 'create_date' => $today->format('Y-m-d 00:00:00'), 'update_date' => $today->format('Y-m-d 00:00:00')));
$I->haveInDatabase('dtb_news', array('news_id' => rand(999, 9999), 'news_date' => $minus2->format('Y-m-d 00:00:00'), 'news_title' => 'タイトル2', 'news_comment' => 'コメント2', 'creator_id' => 1, 'rank' => 3, 'create_date' => $today->format('Y-m-d 00:00:00'), 'update_date' => $today->format('Y-m-d 00:00:00')));
$I->reloadPage();
$news = Fixtures::get('news');
$newsset = array();
$newsset[] = array('date' => $news[0]->getDate(), 'title' => $news[0]->getTitle(), 'comment' => $news[0]->getComment());
$newsset[] = array('date' => $minus1->format('Y-m-d 00:00:00'), 'title' => 'タイトル1', 'comment' => 'コメント1');
$newsset[] = array('date' => $minus2->format('Y-m-d 00:00:00'), 'title' => 'タイトル2', 'comment' => 'コメント2');
foreach ($newsset as $key => $news) {
$I->see($news['title'], '#news_area .newslist dl:nth-child(' . (count($newsset) - $key) . ') .news_title');
}
}
开发者ID:EC-CUBE,项目名称:eccube-codeception,代码行数:29,代码来源:EF01TopCest.php
示例2: loadRuntimeFixtures
/**
* Loads fixture data.
*
* @return void
* @since 0.1.0
*/
public function loadRuntimeFixtures()
{
$serverName = false;
if (isset($_SERVER['SERVER_NAME'])) {
$serverName = $_SERVER['SERVER_NAME'];
}
$maps = array('users' => array('username' => 'login', 'rawPassword' => 'password'), 'posts' => array('name' => 'title', 'user_id' => 'author', 'category_id' => 'category'), 'categories' => array('name' => 'title'));
$dbFixtures = \Yii::app()->fixtureManager->getFixtures();
foreach ($maps as $fixture => $map) {
$data = (require $dbFixtures[$fixture]);
$index = 0;
$keyBase = "data:{$fixture}";
foreach ($data as $item) {
Fixtures::add($keyBase, $item);
foreach ($item as $field => $value) {
if (isset($map[$field])) {
$key = $keyBase . "[{$index}]:" . $map[$field];
} else {
$key = $keyBase . "[{$index}]:" . $field;
}
Fixtures::add($key, $value);
}
$index++;
}
Fixtures::add($keyBase . ':length', $index);
}
Fixtures::add('data:random:int', mt_rand(0, PHP_INT_MAX));
Fixtures::add('data:random:string', md5(Fixtures::get('data:random:int')));
Fixtures::add('defaults:app:language', \Yii::app()->language);
Fixtures::add('defaults:app:name', \Yii::app()->name);
Fixtures::add('defaults:app:theme', \Yii::app()->theme->name);
Fixtures::add('defaults:server:host', $serverName);
}
开发者ID:DavBfr,项目名称:BlogMVC,代码行数:39,代码来源:BootstrapHelper.php
示例3: setStock
public function setStock($pid, $stock = 0)
{
if (!$pid) {
return;
}
$app = Fixtures::get('app');
if (!is_array($stock)) {
$pc = $app['orm.em']->getRepository('Eccube\\Entity\\ProductClass')->findOneBy(array('Product' => $pid));
$pc->setStock($stock);
$pc->setStockUnlimited(Constant::DISABLED);
$ps = $app['orm.em']->getRepository('Eccube\\Entity\\ProductStock')->findOneBy(array('ProductClass' => $pc->getId()));
$ps->setStock($stock);
$app['orm.em']->persist($pc);
$app['orm.em']->persist($ps);
$app['orm.em']->flush();
} else {
$pcs = $app['orm.em']->getRepository('Eccube\\Entity\\ProductClass')->createQueryBuilder('o')->where('o.Product = ' . $pid)->andwhere('o.ClassCategory1 > 0')->getQuery()->getResult();
foreach ($pcs as $key => $pc) {
$pc->setStock($stock[$key]);
$pc->setStockUnlimited(Constant::DISABLED);
$pc->setSaleLimit(2);
$ps = $app['orm.em']->getRepository('Eccube\\Entity\\ProductStock')->findOneBy(array('ProductClass' => $pc->getId()));
$ps->setStock($stock[$key]);
$app['orm.em']->persist($pc);
$app['orm.em']->persist($ps);
$app['orm.em']->flush();
}
}
}
开发者ID:EC-CUBE,项目名称:eccube-codeception,代码行数:29,代码来源:AcceptanceTester.php
示例4: microtime
public function basicinfo_特定商取引法(\AcceptanceTester $I)
{
$I->wantTo('EA0702-UC01-T01 特定商取引法');
$faker = Fixtures::get('faker');
$email = microtime(true) . '.' . $faker->safeEmail;
TradelawSettingPage::go($I)->入力_販売業者('販売業者')->入力_運営責任者('運営責任者')->入力_郵便番号1('530')->入力_郵便番号2('0001')->入力_都道府県('大阪府')->入力_市区町村名('大阪市北区')->入力_番地_ビル名('梅田2-4-9 ブリーゼタワー13F')->入力_電話番号1('111')->入力_電話番号2('111')->入力_電話番号3('111')->入力_Eメール($email)->入力_URL('http://www.ec-cube.net')->入力_商品代金以外の必要料金('term01')->入力_注文方法('term02')->入力_支払方法('term03')->入力_支払期限('term04')->入力_引き渡し時期('term05')->入力_返品交換について('term06')->登録();
$I->see('登録が完了しました。', TradelawSettingPage::$登録完了メッセージ);
}
开发者ID:EC-CUBE,项目名称:eccube-codeception,代码行数:8,代码来源:EA07BasicinfoCest.php
示例5: resetApplicationSettings
/**
* Resets application settings.
*
* @return void
* @since 0.1.0
*/
public function resetApplicationSettings()
{
$appModel = new \ApplicationModel();
$appModel->language = Fixtures::get('defaults:app:language');
$appModel->name = Fixtures::get('defaults:app:name');
$appModel->theme = Fixtures::get('defaults:app:theme');
$appModel->save();
}
开发者ID:EhteshamMehmood,项目名称:BlogMVC,代码行数:14,代码来源:SettingsHelper.php
示例6: _after
protected function _after()
{
$defaultServerName = Fixtures::get('defaults:server:host');
if ($defaultServerName) {
$_SERVER['SERVER_NAME'] = $defaultServerName;
} else {
unset($_SERVER['SERVER_NAME']);
}
}
开发者ID:DavBfr,项目名称:BlogMVC,代码行数:9,代码来源:RssFormatterTest.php
示例7: checkIfLogin
/**
* Define custom actions here
*/
function checkIfLogin(\AcceptanceTester $I)
{
//if ($I->loadSessionSnapshot('login')) return;
$I->amOnPage('/login');
$I->fillField(['name' => 'email'], Fixtures::get('username'));
$I->fillField(['name' => 'password'], Fixtures::get('password'));
$I->click('Let\'s go');
//$I->saveSessionSnapshot('login');
}
开发者ID:njmube,项目名称:invoice-ninja,代码行数:12,代码来源:AcceptanceTester.php
示例8: function
public function topページ_初期表示(\AcceptanceTester $I)
{
$I->wantTo('EA0101-UC01-T01 TOPページ 初期表示');
// TOP画面に現在の受注状況、お知らせ、売り上げ状況、ショップ状況が表示されている
$I->see('受注状況', TopPage::$受付状況);
$I->see('お知らせ', TopPage::$お知らせ);
$I->see('売り上げ状況', TopPage::$売上状況);
$I->see('ショップ状況', TopPage::$ショップ状況);
// 新規受付をクリックすると受注管理画面に遷移することを確認
$I->click(TopPage::$受付状況_新規受付);
$I->see('受注マスター', self::ページタイトル);
$I->goToAdminPage();
// 購入された商品が受注管理画面のページにて反映されていることを確認
$config = Fixtures::get('config');
$findOrders = Fixtures::get('findOrders');
$NewOrders = array_filter($findOrders(), function ($Order) use($config) {
return $Order->getOrderStatus()->getId() == $config['order_new'];
});
$I->see(count($NewOrders), TopPage::$受付状況_新規受付数);
// FIXME [issue] ソート順が指定されていないのでテストが失敗する
// https://github.com/EC-CUBE/ec-cube/issues/1908
// // 入金待ちをクリックすると「受注管理>入金待ち」のページに遷移することを確認
// $I->click(TopPage::$受付状況_入金待ち);
// $I->see('受注マスター', self::ページタイトル);
// $I->seeInField(OrderManagePage::$検索条件_受注ステータス, '2'/*入金待ち*/);
// $I->goToAdminPage();
//
// // 入金済みをクリックすると「受注管理>入金済み」のページに遷移することを確認
// $I->click(TopPage::$受付状況_入金済み);
// $I->see('受注マスター', self::ページタイトル);
// $I->seeInField(OrderManagePage::$検索条件_受注ステータス, '6'/*入金済み*/);
// $I->goToAdminPage();
//
// // 取り寄せ中をクリックすると「受注管理>取り寄せ」のページに遷移することを確認
// $I->click(TopPage::$受付状況_取り寄せ中);
// $I->see('受注マスター', self::ページタイトル);
// $I->seeInField(OrderManagePage::$検索条件_受注ステータス, '4'/*取り寄せ中*/);
// $I->goToAdminPage();
// お知らせの記事をクリックすると設定されたURLに遷移することを確認
$I->executeJS('document.querySelector("iframe.link_list_wrap").setAttribute("name", "news_frame")');
$I->switchToIFrame("news_frame");
$I->click(['css' => '.news_area .link_list .tableish a:nth-child(3)']);
$I->switchToNewWindow();
$I->seeInTitle("全商品 / ECサイト構築・リニューアルは「ECオープンプラットフォームEC-CUBE」");
$I->switchToWindow();
$I->switchToIFrame();
// ショップ情報の在庫切れ商品をクリックすると商品管理ページに遷移することを確認
$I->click(TopPage::$ショップ状況_在庫切れ商品);
$I->see('商品マスター', self::ページタイトル);
$I->goToAdminPage();
// ショップ情報の会員数をクリックすると会員管理に遷移することを確認
$I->click(TopPage::$ショップ状況_会員数);
$I->see('会員マスター', self::ページタイトル);
$I->dontSeeCheckboxIsChecked(CustomerManagePage::$検索条件_仮会員);
$I->seeCheckboxIsChecked(CustomerManagePage::$検索条件_本会員);
}
开发者ID:EC-CUBE,项目名称:eccube-codeception,代码行数:56,代码来源:EA01TopCest.php
示例9: onlinePayment
public function onlinePayment(AcceptanceTester $I)
{
$I->wantTo('test an online payment');
$clientEmail = $this->faker->safeEmail;
$productKey = $this->faker->text(10);
// set gateway info
$I->wantTo('create a gateway');
$I->amOnPage('/company/payments');
if (strpos($I->grabFromCurrentUrl(), 'create') > 0) {
$I->fillField(['name' => '23_apiKey'], Fixtures::get('gateway_key'));
$I->selectOption('#token_billing_type_id', 4);
$I->click('Save');
$I->see('Successfully created gateway');
}
// create client
$I->amOnPage('/clients/create');
$I->fillField(['name' => 'email'], $clientEmail);
$I->click('Save');
$I->see($clientEmail);
// create product
$I->amOnPage('/products/create');
$I->fillField(['name' => 'product_key'], $productKey);
$I->fillField(['name' => 'notes'], $this->faker->text(80));
$I->fillField(['name' => 'cost'], $this->faker->numberBetween(1, 20));
$I->click('Save');
$I->see($productKey);
// create invoice
$I->amOnPage('/invoices/create');
$I->selectDropdown($I, $clientEmail, '.client_select .dropdown-toggle');
$I->fillField('table.invoice-table tbody tr:nth-child(1) #product_key', $productKey);
$I->click('Save');
$I->see($clientEmail);
// enter payment
$clientId = $I->grabFromDatabase('contacts', 'client_id', ['email' => $clientEmail]);
$invoiceId = $I->grabFromDatabase('invoices', 'id', ['client_id' => $clientId]);
$invitationKey = $I->grabFromDatabase('invitations', 'invitation_key', ['invoice_id' => $invoiceId]);
$clientSession = $I->haveFriend('client');
$clientSession->does(function (AcceptanceTester $I) use($invitationKey) {
$I->amOnPage('/view/' . $invitationKey);
$I->click('Pay Now');
$I->fillField(['name' => 'first_name'], $this->faker->firstName);
$I->fillField(['name' => 'last_name'], $this->faker->lastName);
$I->fillField(['name' => 'address1'], $this->faker->streetAddress);
$I->fillField(['name' => 'address2'], $this->faker->streetAddress);
$I->fillField(['name' => 'city'], $this->faker->city);
$I->fillField(['name' => 'state'], $this->faker->state);
$I->fillField(['name' => 'postal_code'], $this->faker->postcode);
$I->selectDropdown($I, 'United States', '.country-select .dropdown-toggle');
$I->fillField(['name' => 'card_number'], '4242424242424242');
$I->fillField(['name' => 'cvv'], '1234');
$I->selectOption('#expiration_month', 12);
$I->selectOption('#expiration_year', date('Y'));
$I->click('.btn-success');
$I->see('Successfully applied payment');
});
}
开发者ID:GhDj,项目名称:erp-fac-fin,代码行数:56,代码来源:OnlinePaymentCest.php
示例10: getValueFromArray
protected function getValueFromArray($param)
{
$value = null;
preg_match_all(static::$regEx['array'], $param, $args);
$array = Fixtures::get($args['var'][0]);
if (array_key_exists($args['key'][0], $array)) {
$value = $array[$args['key'][0]];
}
return $value;
}
开发者ID:edno,项目名称:codeception-gherkin-param,代码行数:10,代码来源:GherkinParam.php
示例11: sendRequest
private function sendRequest($url, $data, $type = 'POST')
{
$url = Fixtures::get('url') . '/api/v1/' . $url;
$data = json_encode($data);
$curl = curl_init();
$opts = [CURLOPT_URL => $url, CURLOPT_RETURNTRANSFER => true, CURLOPT_CUSTOMREQUEST => $type, CURLOPT_POST => $type === 'POST' ? 1 : 0, CURLOPT_POSTFIELDS => $data, CURLOPT_HTTPHEADER => ['Content-Type: application/json', 'Content-Length: ' . strlen($data), 'X-Ninja-Token: ' . $this->token]];
curl_setopt_array($curl, $opts);
$response = curl_exec($curl);
curl_close($curl);
return json_decode($response);
}
开发者ID:magicians,项目名称:invoiceninja,代码行数:11,代码来源:APICest.php
示例12: _before
protected function _before()
{
$grav = Fixtures::get('grav');
$this->grav = $grav();
$this->pages = $this->grav['pages'];
$this->grav['config']->set('system.home.alias', '/home');
/** @var UniformResourceLocator $locator */
$locator = $this->grav['locator'];
$locator->addPath('page', '', 'tests/fake/simple-site/user/pages', false);
$this->pages->init();
}
开发者ID:getgrav,项目名称:grav,代码行数:11,代码来源:PagesTest.php
示例13: setUp
/**
* { @inheritdoc }
*/
protected function setUp()
{
parent::setUp();
if (Codeception\Codecept::VERSION >= '2.1.0') {
$this->module = $this->moduleContainer->getModule('\\Codeception\\Module\\Drupal7\\Drupal7');
} else {
$this->module = $this->getModule('\\Codeception\\Module\\Drupal7\\Drupal7');
}
$this->validConfig = Fixtures::get('validModuleConfig');
$this->invalidConfig = Fixtures::get('invalidModuleConfig');
}
开发者ID:chapabu,项目名称:codeception-module-drupal,代码行数:14,代码来源:ConfigurationTest.php
示例14: testClassIsInitializedProperly
public function testClassIsInitializedProperly()
{
$this->assertEquals("schema", $this->import->type, "the type is set to 'schema'");
$this->assertEquals("updatedata.csv", $this->import->file, "the file is set to 'updatedata.csv'");
$this->assertEquals(81, $this->import->vocabId, "the vocabid is set to '81'");
$this->assertTrue(is_integer($this->import->vocabId), "the vocabid is an integer");
$this->assertEquals(
Fixtures::get("importFolder")."updatedata.csv",
$this->import->importFolder . $this->import->file,
"the path is set"
);
}
开发者ID:jonphipps,项目名称:Metadata-Registry,代码行数:12,代码来源:importUpdatePrologTest.php
示例15: tryToTest
public function tryToTest(AcceptanceTester $I)
{
$I->wantTo('perform actions and see result');
$I->amOnPage('/');
$I->see('くらしを楽しむライフスタイルグッズ', '.copy');
$shopName = $I->grabFromDatabase('dtb_base_info', 'shop_name');
$I->assertEquals('EC-CUBE3 SHOP', $shopName);
$products = $I->grabFromDatabase('dtb_product', 'status', array('product_id' => 1));
codecept_debug($products);
$bi = Fixtures::get('baseinfo');
codecept_debug($bi->getShopName());
foreach (Fixtures::get('categories') as $category) {
codecept_debug($category->getName());
}
}
开发者ID:EC-CUBE,项目名称:eccube-codeception,代码行数:15,代码来源:PageAccessCest.php
示例16: testCanScrapePaginatedPage
/**
* Scrape a category with pages
*/
public function testCanScrapePaginatedPage()
{
$broadside = array_fill(0, 20, Fixtures::get('broadside'));
$responses = array_merge([Fixtures::get('aleAndStout')], $broadside, [Fixtures::get('aleAndStoutPage2')], $broadside, [Fixtures::get('aleAndStoutPage3')], $broadside, [Fixtures::get('aleAndStoutPage4')], $broadside, [Fixtures::get('aleAndStoutPage5')], $broadside, [Fixtures::get('aleAndStoutPage6')], $broadside, [Fixtures::get('aleAndStoutPage7')], array_fill(0, 16, Fixtures::get('broadside')));
$this->scraper->setHttpClient($this->getHttpClient($responses));
$output = $this->scraper->scrape('http://www.sainsburys.mock/shop/gb/groceries/drinks/ale-stout');
$this->assertInternalType('object', $output, "Scrape must return an object");
$this->assertInternalType('array', $output->results, "Scrape must an array of results");
$this->assertEquals(136, count($output->results), "The results contains the correct number of products");
$this->assertEquals("410.1", $output->total, "The total unit price is correct");
$this->assertEquals("Adnams Broadside Ale 500ml", $output->results[0]->title, "The product title is correct");
$this->assertEquals("2.00", $output->results[0]->unit_price, "The product unit price is correct");
$this->assertEquals("40.46kb", $output->results[0]->size, "The product HTML page size is correct");
$this->assertContains("Broadside is brewed to commemorate the Battle of Sole Bay (1672). This dark ruby red beer is full of fruitcake flavours and is great savoured with some strong cheddar.", $output->results[0]->description, "The product description is correct");
}
开发者ID:peterhough,项目名称:sainsburys,代码行数:18,代码来源:ScraperTest.php
示例17: testAuthentication
public function testAuthentication()
{
$username = Fixtures::get('data:users[0]:login');
$password = Fixtures::get('data:users[0]:password');
\Yii::app()->fixtureManager->prepare();
// setting inexsiting username
$identity = new \UserIdentity(md5(mt_rand(0, PHP_INT_MAX)), $password);
$this->assertFalse($identity->authenticate());
$this->assertSame($identity->errorCode, \UserIdentity::ERROR_USERNAME_INVALID);
// setting inexisting password
$identity->password = $identity->username;
$identity->username = $username;
$this->assertFalse($identity->authenticate());
$this->assertSame($identity->errorCode, \UserIdentity::ERROR_PASSWORD_INVALID);
$identity->password = $password;
$this->assertTrue($identity->authenticate());
$this->assertSame($identity->errorCode, \UserIdentity::ERROR_NONE);
}
开发者ID:EhteshamMehmood,项目名称:BlogMVC,代码行数:18,代码来源:UserIdentityTest.php
示例18: afterSuiteAcceptance
/**
* Clean up after acceptance test suite run.
*
* We will copy the configs and database used to cache for inspection, really
* only useful on test development runs but little impact overall.
*
* @param \Codeception\Event\SuiteEvent $e
*/
private function afterSuiteAcceptance(SuiteEvent $e)
{
// Empty the cache
$this->nut('cache:clear');
$fs = new Filesystem();
$rundir = INSTALL_ROOT . '/app/cache/codeception-run-' . time() . '/';
$fs->mkdir($rundir);
// Restore our backed up files, and make copies of them in app/cache/ for review
$backups = Fixtures::get('backups');
foreach ($backups as $file => $keep) {
if ($fs->exists("{$file}.codeception-backup")) {
$this->writeln("Restoring {$file}");
$fs->copy($file, $rundir . basename($file));
$fs->rename("{$file}.codeception-backup", $file, true);
}
}
if ($fs->exists(INSTALL_ROOT . '/app/config/extensions/testerevents.bolt.yml')) {
$fs->remove(INSTALL_ROOT . '/app/config/extensions/testerevents.bolt.yml');
}
}
开发者ID:bolt,项目名称:bolt,代码行数:28,代码来源:CodeceptionEventsExtension.php
示例19: _before
protected function _before()
{
$grav = Fixtures::get('grav');
$this->grav = $grav();
$this->pages = $this->grav['pages'];
$this->config = $this->grav['config'];
$this->uri = $this->grav['uri'];
$this->language = $this->grav['language'];
$this->old_home = $this->config->get('system.home.alias');
$this->config->set('system.home.alias', '/item1');
$this->config->set('system.absolute_urls', false);
$this->config->set('system.languages.supported', []);
unset($this->grav['language']);
$this->grav['language'] = new Language($this->grav);
/** @var UniformResourceLocator $locator */
$locator = $this->grav['locator'];
$locator->addPath('page', '', 'tests/fake/nested-site/user/pages', false);
$this->pages->init();
$defaults = ['extra' => false, 'auto_line_breaks' => false, 'auto_url_links' => false, 'escape_markup' => false, 'special_chars' => ['>' => 'gt', '<' => 'lt']];
$page = $this->pages->dispatch('/item2/item2-2');
$this->parsedown = new Parsedown($page, $defaults);
}
开发者ID:getgrav,项目名称:grav,代码行数:22,代码来源:ParsedownTest.php
示例20: count
public function product_商品一覧表示件数(\AcceptanceTester $I)
{
$I->wantTo('EF0201-UC04-T01 商品一覧ページ 表示件数');
$I->amOnPage('/');
// TOPページ>商品一覧(ヘッダーのいずれかのカテゴリを選択)へ遷移
$I->moveMouseOver(['css' => '#category .category-nav li:nth-child(2)']);
$I->wait(3);
$I->click('#header #category ul li:nth-child(2) a');
// 各商品のサムネイルが表示される
$config = Fixtures::get('test_config');
$productNum = $config['fixture_product_num'] + 2;
$itemNum = $productNum >= 15 ? 15 : $productNum;
$products = $I->grabMultiple('#item_list .product_item');
$I->assertTrue(count($products) == $itemNum);
// 表示件数の選択リストを変更する
$I->selectOption(['css' => "#page_navi_top select[name = 'disp_number']"], '30件');
// 変更された表示件数分が1画面に表示される
$expected = $productNum >= 30 ? 30 : $productNum;
$products = $I->grabMultiple('#item_list .product_item');
$actual = count($products);
$I->assertEquals($expected, $actual, $expected . ' と ' . $actual . ' が異なります');
}
开发者ID:EC-CUBE,项目名称:eccube-codeception,代码行数:22,代码来源:EF02ProductCest.php
注:本文中的Codeception\Util\Fixtures类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论