diff --git a/.babelrc b/.babelrc index c59d719746..ee6b2ca97c 100644 --- a/.babelrc +++ b/.babelrc @@ -1,14 +1,16 @@ { "presets": [ [ - "env", - { - "targets": { - "ie": 11 - }, - // 必要な分だけのpolyfillを自動でインポート - "useBuiltIns": "usage" - } + "@babel/preset-env", + { + "targets": { + "node": "current", + "ie": 11 + }, + // 必要な分だけのpolyfillを自動でインポート + "useBuiltIns": "usage", + "corejs": 2 + } ] ] } diff --git a/.editorconfig b/.editorconfig index bee205e8ea..7905c3696e 100644 --- a/.editorconfig +++ b/.editorconfig @@ -12,7 +12,7 @@ trim_trailing_whitespace = true indent_style = space indent_size = 4 -[*.{yml,yaml,json,js}] +[*.{yml,yaml,json,js,ts}] indent_style = space indent_size = 2 diff --git a/.eslintrc.json b/.eslintrc.json index 70d3207fe6..486ca01344 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -7,6 +7,19 @@ "plugins": [ "import" ], - "parser": "babel-eslint", - "extends": "jquery" + "parser": "@typescript-eslint/parser", + "extends": [ + "plugin:@typescript-eslint/recommended", + "plugin:prettier/recommended", + "prettier/@typescript-eslint", + "jquery" + ], + "rules": { + "prettier/prettier": [ + "error", + { + "singleQuote": true + } + ] + } } diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 04a8fec1e1..c7b432e6b9 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -70,13 +70,7 @@ jobs: php-version: ${{ matrix.php }} - name: Install to Composer - run: | - composer install --no-interaction -o - composer require php5friends/codeception-phpunit48-wrapper ">=6.0.20" --dev - composer require captbaritone/mailcatcher-codeception-module "1.2.1" --dev - composer require codeception/codeception "*" --dev - composer remove php5friends/codeception-phpunit48-wrapper --dev - composer remove php5friends/phpunit48 --ignore-platform-reqs --dev + run: composer install --no-interaction -o - name: Create ADMIN_DIR run: | @@ -110,59 +104,11 @@ jobs: phpdbg -qrr data/vendor/bin/phpunit tests/class/SC_SessionFactoryTest.php --coverage-clover=coverage3.xml mv data/config/config.php.bak data/config/config.php - - name: Install symfony/cli - continue-on-error: true - run: | - wget https://get.symfony.com/cli/installer -O - | bash - sudo mv ~/.symfony/bin/symfony /usr/local/bin/symfony - symfony local:php:list - - - name: setup-chromedriver - uses: nanasess/setup-chromedriver@master - - name: Run chromedriver - run: | - export DISPLAY=:99 - chromedriver --url-base=/wd/hub & - echo ">>> Started chrome-driver" - sudo Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 & - echo ">>> Started xvfb" - - name: Setup C3 - run: | - wget https://raw.github.com/Codeception/c3/2.0/c3.php - sed -i 's,/vendor/autoload.php,/data/vendor/autoload.php,g' c3.php - echo "include __DIR__.'/../c3.php';" >> html/define.php - - name: Run to Codeception - continue-on-error: true - env: - DB: ${{ matrix.db }} - USER: ${{ matrix.dbuser }} - DBUSER: ${{ matrix.dbuser }} - DBPASS: ${{ matrix.dbpass }} - DBNAME: ${{ matrix.dbname }} - DBPORT: ${{ matrix.dbport }} - DBSERVER: 127.0.0.1 - HTTP_URL: http://127.0.0.1:8085/ - HTTPS_URL: http://127.0.0.1:8085/ - XDEBUG_MODE: coverage - run: | - sudo phpenmod -s cli xdebug - sudo phpenmod -s fpm xdebug - mv html/admin html/${ADMIN_DIR} - php data/vendor/bin/codecept build - symfony serve -d --no-tls --port=8085 --document-root=html - php data/vendor/bin/codecept run --env chrome,http --skip-group installer --skip-group excludeCoverage --steps --coverage --coverage-xml - mv ./ctests/_output/acceptance\ \(chrome,\ http\).remote.coverage.xml ctests/_output/acceptance.remote.coverage.xml - - name: Upload coverage uses: codecov/codecov-action@v1 with: - files: ./coverage1.xml,./coverage2.xml,./coverage3.xml,./ctests/_output/acceptance.remote.coverage.xml + files: ./coverage1.xml,./coverage2.xml,./coverage3.xml # token: ${{ secrets.CODECOV_TOKEN }} flags: tests # yml: ./codecov.yml fail_ci_if_error: true - - name: Upload evidence - uses: actions/upload-artifact@v2 - with: - name: coverage-evidence - path: ctests/_output/ diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index f183b21028..bef85cb2a6 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -123,7 +123,6 @@ jobs: rm -rf $GITHUB_WORKSPACE/Procfile rm -rf $GITHUB_WORKSPACE/build.xml rm -rf $GITHUB_WORKSPACE/README.md - rm -rf $GITHUB_WORKSPACE/codeception.yml rm -rf $GITHUB_WORKSPACE/php.ini rm -rf $GITHUB_WORKSPACE/phpinicopy.sh rm -rf $GITHUB_WORKSPACE/phpinidel.sh @@ -131,7 +130,8 @@ jobs: rm -rf $GITHUB_WORKSPACE/setup.sh rm -rf $GITHUB_WORKSPACE/setup_heroku.php rm -rf $GITHUB_WORKSPACE/svn_propset.sh - rm -rf $GITHUB_WORKSPACE/ctests + rm -rf $GITHUB_WORKSPACE/playwright* + rm -rf $GITHUB_WORKSPACE/e2e-tests rm -rf $GITHUB_WORKSPACE/tests rm -rf $GITHUB_WORKSPACE/templates rm -rf $GITHUB_WORKSPACE/patches diff --git a/.github/workflows/e2e-tests.yml b/.github/workflows/e2e-tests.yml new file mode 100644 index 0000000000..0efbb29d95 --- /dev/null +++ b/.github/workflows/e2e-tests.yml @@ -0,0 +1,172 @@ +name: E2E testing for EC-CUBE +on: + push: + branches: + - '*' + tags: + - '*' + paths: + - '**' + - '!*.md' + pull_request: + paths: + - '**' + - '!*.md' +jobs: + run-on-linux: + name: Run on Linux + runs-on: ubuntu-18.04 + strategy: + fail-fast: false + matrix: + group: + - 'test/front_login' + - 'test/front_guest' + - 'test/admin' + + steps: + - name: Checkout + uses: actions/checkout@v2 + + # - name: Create ADMIN_DIR + # run: | + # sudo apt-fast install -y sharutils + # echo "ADMIN_DIR=$(head -c 10 < /dev/random | uuencode -m - | tail -n 2 |head -n 1 | sed 's,[/+],_,g' | head -c10)/" >> $GITHUB_ENV + - name: Setup environment + run: echo "COMPOSE_FILE=docker-compose.yml:docker-compose.pgsql.yml:docker-compose.dev.yml:docker-compose.owaspzap.yml:docker-compose.owaspzap.daemon.yml" >> $GITHUB_ENV + + - name: Setup to EC-CUBE + env: + HTTP_URL: https://127.0.0.1:8085/ + HTTPS_URL: https://127.0.0.1:8085/ + run: | + sudo chown -R 1001:1000 zap + sudo chmod -R g+w zap + docker-compose up -d + docker-compose exec -T ec-cube composer install + docker-compose exec -T ec-cube composer update 'symfony/*' --ignore-platform-req=php -W + docker-compose exec -T ec-cube php data/vendor/bin/eccube eccube:fixtures:generate --products=5 --customers=1 --orders=5 + docker-compose exec -T postgres psql --user=eccube_db_user eccube_db -c "UPDATE dtb_customer SET email = 'zap_user@example.com' WHERE customer_id = (SELECT MAX(customer_id) FROM dtb_customer WHERE status = 2 AND del_flg = 0);" + + - run: sleep 1 + - run: | + yarn install + yarn run playwright install --with-deps chromium + yarn playwright install-deps chromium + + - name: Run to E2E testing + env: + GROUP: ${{ matrix.group }} + HTTPS_PROXY: 'localhost:8090' + HTTP_PROXY: 'localhost:8090' + CI: 1 + FORCE_COLOR: 1 + run: yarn test:e2e e2e-tests/${GROUP} + + - name: Upload evidence + if: failure() + uses: actions/upload-artifact@v2 + with: + name: linux-php${{ matrix.tag }}-${{ matrix.db }}-evidence + path: 'test-results/' + - name: Upload logs + if: failure() + uses: actions/upload-artifact@v2 + with: + name: linux-php${{ matrix.php }}-${{ matrix.db }}-logs + path: data/logs + installer: + name: Installer test + runs-on: ubuntu-18.04 + strategy: + fail-fast: false + matrix: + db: [ 'pgsql', 'mysql' ] + tag: + - '5.6-apache' + - '7.1-apache' + - '7.2-apache' + - '7.3-apache' + - '7.4-apache' + include: + - db: mysql + dbport: '3306' + dbuser: 'eccube_db_user' + dbpass: 'password' + dbname: 'eccube_db' + dbhost: 'mysql' + - db: pgsql + dbport: '5432' + dbuser: 'eccube_db_user' + dbpass: 'password' + dbname: 'eccube_db' + dbhost: 'postgres' + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Setup environment + env: + DB_TYPE: ${{ matrix.db }} + run: echo "COMPOSE_FILE=docker-compose.yml:docker-compose.${DB_TYPE}.yml:docker-compose.dev.yml:docker-compose.owaspzap.yml:docker-compose.owaspzap.daemon.yml" >> $GITHUB_ENV + - name: Setup to EC-CUBE + env: + HTTP_URL: https://127.0.0.1:8085/ + HTTPS_URL: https://127.0.0.1:8085/ + TAG: ${{ matrix.tag }} + run: | + sudo chown -R 1001:1000 zap + sudo chmod -R g+w zap + sh -c 'echo "> data/config/config.php' + docker-compose build --build-arg TAG=${TAG} ec-cube + docker-compose up -d + + - run: sleep 1 + - run: | + yarn install + yarn run playwright install --with-deps chromium + yarn playwright install-deps chromium + - run: | + rm data/config/config.php + chmod -R o+w html + chmod o+w data + chmod -R o+w data/Smarty + chmod -R o+w data/cache + chmod -R o+w data/class + chmod -R o+w data/class_extends + chmod o+w data/config + chmod -R o+w data/download + chmod -R o+w data/downloads + chmod o+w data/fonts + chmod o+w data/include + chmod o+w data/logs + chmod -R o+w data/module + chmod o+w data/smarty_extends + chmod o+w data/upload + chmod o+w data/upload/csv + + - name: Run to E2E testing + env: + HTTP_PROXY: 'localhost:8090' + HTTPS_PROXY: 'localhost:8090' + CI: 1 + FORCE_COLOR: 1 + DB_TYPE: ${{ matrix.db }} + DB_USER: ${{ matrix.dbuser }} + DB_PASSWORD: ${{ matrix.dbpass }} + DB_NAME: ${{ matrix.dbname }} + DB_PORT: ${{ matrix.dbport }} + DB_SERVER: ${{ matrix.dbhost }} + run: yarn test:e2e e2e-tests/test/installer/installer.test.ts + - name: Upload logs + if: failure() + uses: actions/upload-artifact@v2 + with: + name: linux-php${{ matrix.tag }}-${{ matrix.db }}-logs + path: html/install/temp/install.log* + - name: Upload evidence + if: failure() + uses: actions/upload-artifact@v2 + with: + name: linux-php${{ matrix.tag }}-${{ matrix.db }}-evidence + path: 'test-results/' diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 1892b04cab..7a867533d8 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -71,17 +71,14 @@ jobs: restore-keys: | ${{ runner.os }}-composer- - - name: Install to Composer - run: | - composer install --no-interaction -o - composer require php5friends/codeception-phpunit48-wrapper ">=6.0.20" --dev - composer require captbaritone/mailcatcher-codeception-module "1.2.1" --dev - composer require codeception/codeception "*" --dev + - name: composer install + run: composer install --no-interaction -o - name: Setup PHP uses: nanasess/setup-php@master with: php-version: ${{ matrix.php }} + - name: Setup PHP5.6 if: matrix.php == '5.6' run: sudo apt-fast install -y php5.6-fpm @@ -133,35 +130,6 @@ jobs: - name: Run to PHPUnit SessionFactory run: data/vendor/bin/phpunit tests/class/SC_SessionFactoryTest.php - - name: Run chromedriver - run: | - export DISPLAY=:99 - chromedriver --url-base=/wd/hub & - echo ">>> Started chrome-driver" - sudo Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 & - echo ">>> Started xvfb" - - name: Run to Codeception - env: - DB: ${{ matrix.db }} - USER: ${{ matrix.dbuser }} - DBUSER: ${{ matrix.dbuser }} - DBPASS: ${{ matrix.dbpass }} - DBNAME: ${{ matrix.dbname }} - DBPORT: ${{ matrix.dbport }} - DBSERVER: 127.0.0.1 - HTTP_URL: https://127.0.0.1:8085/ - HTTPS_URL: https://127.0.0.1:8085/ - run: | - mv html/admin html/${ADMIN_DIR} - php data/vendor/bin/codecept build - symfony serve -d --allow-http --port=8085 --document-root=html - php data/vendor/bin/codecept run --env chrome --skip-group installer --steps - - name: Upload evidence - if: failure() - uses: actions/upload-artifact@v2 - with: - name: linux-php${{ matrix.php }}-${{ matrix.db }}-evidence - path: ctests/_output/ - name: Upload logs if: failure() uses: actions/upload-artifact@v2 @@ -195,7 +163,7 @@ jobs: - run: echo "extension=gd" >> C:/tools/php/php.ini shell: bash - - name: Install to Composer + - name: composer install run: composer install --no-interaction -o - name: Setup to database @@ -238,157 +206,3 @@ jobs: with: name: windows-php${{ matrix.php }}-${{ matrix.db }}-logs path: data\logs - - install-to-linux: - name: Install to Linux - runs-on: ${{ matrix.operating-system }} - strategy: - fail-fast: false - matrix: - operating-system: [ ubuntu-18.04 ] - php: [ 5.4, 5.5, 5.6, 7.1, 7.2, 7.3, 7.4, 8.0 ] - db: [ mysql, pgsql ] - include: - - db: mysql - dbport: '3306' - dbuser: 'root' - dbpass: 'password' - dbname: 'eccube_db' - - db: pgsql - dbport: '5432' - dbuser: 'postgres' - dbpass: 'password' - dbname: 'eccube_db' - services: - mysql: - image: mysql:5.7 - env: - MYSQL_ROOT_PASSWORD: password - ports: - - 3306:3306 - options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 - postgres: - image: postgres:12 - env: - POSTGRES_USER: postgres - POSTGRES_PASSWORD: password - POSTGRES_DB: postgres - ports: - - 5432:5432 - # needed because the postgres container does not provide a healthcheck - options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 - mailcatcher: - image: schickling/mailcatcher - ports: - - 1080:1080 - - 1025:1025 - steps: - - name: Checkout - uses: actions/checkout@v2 - - - name: Get Composer Cache Directory - id: composer-cache - run: | - echo "::set-output name=dir::$(composer config cache-files-dir)" - - uses: actions/cache@v1 - with: - path: ${{ steps.composer-cache.outputs.dir }} - key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} - restore-keys: | - ${{ runner.os }}-composer- - - - name: Install to Composer - run: | - composer install --no-interaction -o - composer require php5friends/codeception-phpunit48-wrapper ">=6.0.20" --dev - composer require captbaritone/mailcatcher-codeception-module "1.2.1" --dev - composer require codeception/codeception "*" --dev - - - name: Setup PHP - uses: nanasess/setup-php@master - with: - php-version: ${{ matrix.php }} - - name: php-fpm - env: - PHP_VERSION: ${{ matrix.php }} - run: | - if [ -f /lib/systemd/system/php${PHP_VERSION}-fpm.service ] - then - sudo systemctl enable php${PHP_VERSION}-fpm - fi - - - name: Install symfony/cli - # server:ca:install でエラーは出るが利用可能 - continue-on-error: true - run: | - sudo apt-fast -y install libnss3-tools - wget https://get.symfony.com/cli/installer -O - | bash - sudo mv ~/.symfony/bin/symfony /usr/local/bin/symfony - symfony local:php:list - symfony server:ca:install - - - name: setup-chromedriver - uses: nanasess/setup-chromedriver@master - - - name: Run chromedriver - run: | - export DISPLAY=:99 - chromedriver --url-base=/wd/hub & - echo ">>> Started chrome-driver" - sudo Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 & - echo ">>> Started xvfb" - - name: CREATE mysql DATABASE - if: matrix.db == 'mysql' - env: - DB: ${{ matrix.db }} - USER: ${{ matrix.dbuser }} - DBUSER: ${{ matrix.dbuser }} - DBPASS: ${{ matrix.dbpass }} - DBNAME: ${{ matrix.dbname }} - DBPORT: ${{ matrix.dbport }} - DBSERVER: 127.0.0.1 - run: mysql --user=${DBUSER} --password=${DBPASS} -h ${DBSERVER} -P ${DBPORT} -e "CREATE DATABASE ${DBNAME} DEFAULT COLLATE=utf8_general_ci;" - - - name: CREATE pgsql DATABASE - if: matrix.db == 'pgsql' - env: - DB: ${{ matrix.db }} - USER: ${{ matrix.dbuser }} - DBUSER: ${{ matrix.dbuser }} - DBPASS: ${{ matrix.dbpass }} - DBNAME: ${{ matrix.dbname }} - DBPORT: ${{ matrix.dbport }} - DBSERVER: 127.0.0.1 - run: | - sudo apt-fast install -y postgresql-client - export PGPASSWORD=${DBPASS} - psql -h ${DBSERVER} -U ${DBUSER} -p ${DBPORT} -c "CREATE DATABASE ${DBNAME};" - - - name: Run to Codeception - env: - DB: ${{ matrix.db }} - USER: ${{ matrix.dbuser }} - DBUSER: ${{ matrix.dbuser }} - DBPASS: ${{ matrix.dbpass }} - DBNAME: ${{ matrix.dbname }} - DBPORT: ${{ matrix.dbport }} - DBSERVER: 127.0.0.1 - HTTP_URL: https://127.0.0.1:8085/ - HTTPS_URL: https://127.0.0.1:8085/ - run: | - php data/vendor/bin/codecept build - symfony serve -d --allow-http --port=8085 --document-root=html - php data/vendor/bin/codecept run --env chrome --group installer --steps acceptance InstallerCept - - - name: Upload evidence - if: failure() - uses: actions/upload-artifact@v2 - with: - name: install-linux-php${{ matrix.php }}-evidence - path: ctests/_output/ - - name: Upload logs - if: failure() - uses: actions/upload-artifact@v2 - with: - name: install-linux-php${{ matrix.php }}-logs - path: html/install/temp/ diff --git a/.github/workflows/penetration-tests.yml b/.github/workflows/penetration-tests.yml new file mode 100644 index 0000000000..9ac0e4f2d8 --- /dev/null +++ b/.github/workflows/penetration-tests.yml @@ -0,0 +1,78 @@ +name: Penetration testing for EC-CUBE +on: + schedule: + - cron: '0 15 * * 1' + +jobs: + PenetrationTest: + name: Penetration testing + runs-on: ubuntu-18.04 + strategy: + fail-fast: false + matrix: + group: + - 'test/front_login/contact.test.ts' + + steps: + - name: Checkout + uses: actions/checkout@v2 + + # - name: Create ADMIN_DIR + # run: | + # sudo apt-fast install -y sharutils + # echo "ADMIN_DIR=$(head -c 10 < /dev/random | uuencode -m - | tail -n 2 |head -n 1 | sed 's,[/+],_,g' | head -c10)/" >> $GITHUB_ENV + + - name: Apply patchs + run: | + git config --global user.name "$(git --no-pager log --format=format:'%an' -n 1)" + git config --global user.email "$(git --no-pager log --format=format:'%ae' -n 1)" + git am zap/patches/0001-CSRF-OWASP-ZAP.patch + + - name: Setup environment + run: echo "COMPOSE_FILE=docker-compose.yml:docker-compose.pgsql.yml:docker-compose.dev.yml:docker-compose.owaspzap.yml:docker-compose.owaspzap.daemon.yml" >> $GITHUB_ENV + + - name: Setup to EC-CUBE + env: + HTTP_URL: https://127.0.0.1:8085/ + HTTPS_URL: https://127.0.0.1:8085/ + run: | + sudo chown -R 1001:1000 zap + sudo chmod -R g+w zap + docker-compose up -d + docker-compose exec -T ec-cube composer install + docker-compose exec -T ec-cube composer update 'symfony/*' --ignore-platform-req=php -W + docker-compose exec -T ec-cube php data/vendor/bin/eccube eccube:fixtures:generate --products=5 --customers=1 --orders=5 + docker-compose exec -T postgres psql --user=eccube_db_user eccube_db -c "UPDATE dtb_customer SET email = 'zap_user@example.com' WHERE customer_id = (SELECT MAX(customer_id) FROM dtb_customer WHERE status = 2 AND del_flg = 0);" + + - run: sleep 1 + - run: | + yarn install + yarn run playwright install --with-deps chromium + yarn playwright install-deps chromium + + - name: Penetration testing + env: + GROUP: ${{ matrix.group }} + HTTPS_PROXY: 'localhost:8090' + HTTP_PROXY: 'localhost:8090' + CI: 1 + FORCE_COLOR: 1 + run: yarn test:attack e2e-tests/${GROUP} + + - env: + GROUP: ${{ matrix.group }} + if: always() + run: echo "ARTIFACT_NAME=$(echo ${GROUP} | sed 's,/,_,g')" >> $GITHUB_ENV + - name: Upload evidence + if: always() + uses: actions/upload-artifact@v2 + with: + name: zap-${{ env.ARTIFACT_NAME}}-session + path: zap/sessions + + - name: Upload logs + if: failure() + uses: actions/upload-artifact@v2 + with: + name: linux-php${{ matrix.php }}-${{ matrix.db }}-logs + path: data/logs diff --git a/.github/workflows/phpstan.yml b/.github/workflows/phpstan.yml index 855a8343d3..e94b56e888 100644 --- a/.github/workflows/phpstan.yml +++ b/.github/workflows/phpstan.yml @@ -37,8 +37,11 @@ jobs: with: php-version: '8.0' - name: composer install + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # 暫定対応 run: | sudo composer selfupdate + composer config github-oauth.github.com ${GITHUB_TOKEN} composer install --dev --no-interaction -o --apcu-autoloader composer require --dev --ignore-platform-req=php phpstan/phpstan diff --git a/.gitignore b/.gitignore index cf6d589b2f..44daed1757 100644 --- a/.gitignore +++ b/.gitignore @@ -22,6 +22,8 @@ composer.phar /tests/tmp/* /ctests/_output/* /reports/* +/playwright-report/* +/videos/* .idea vagrant .vagrant/ diff --git a/Dockerfile b/Dockerfile index d6c2da3bf3..8d4809b75b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,11 @@ -FROM eccube2/php:7.4-apache +ARG TAG=7.4-apache +FROM eccube2/php:${TAG} ENV APACHE_DOCUMENT_ROOT /var/www/app/html ENV ECCUBE_PREFIX /var/www/app - +# See https://github.com/debuerreotype/debuerreotype/issues/10 +RUN mkdir /usr/share/man/man1 +RUN mkdir /usr/share/man/man7 RUN apt-get update \ && apt-get install --no-install-recommends -y \ ssl-cert \ diff --git a/codeception.yml b/codeception.yml deleted file mode 100644 index 2422a8289e..0000000000 --- a/codeception.yml +++ /dev/null @@ -1,29 +0,0 @@ -actor: Tester -paths: - tests: ctests - log: ctests/_output - data: ctests/_data - helpers: ctests/_support -settings: - bootstrap: _bootstrap.php - colors: true - memory_limit: 1024M - log: true -modules: - config: - Db: - dsn: '' - user: '' - password: '' - dump: ctests/_data/dump.sql -params: - - env -coverage: - enabled: true - whitelist: - include: - - data/class/* - exclude: - - data/class/graph/* - - data/class/batch/* - - data/class/db/dbfactory/* diff --git a/composer.json b/composer.json index d98e83db53..614b59d771 100644 --- a/composer.json +++ b/composer.json @@ -22,8 +22,10 @@ } }, "require-dev": { + "ec-cube2/cli": "dev-master@dev", "fzaninotto/faker": "^1.8", "guzzlehttp/guzzle": "^5.3", + "nanasess/eccube2-fixture-generator": "dev-main@dev", "php5friends/phpunit48": ">=4.8.41" }, "require": { diff --git a/composer.lock b/composer.lock index 7c0f10be89..648f3c7af1 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "766b804028b6a27d82a328fb8539d3a4", + "content-hash": "f3af91a6379d257e02989672ea35c6ef", "packages": [ { "name": "mobiledetect/mobiledetectlib", @@ -967,6 +967,58 @@ }, "time": "2015-06-14T21:17:01+00:00" }, + { + "name": "ec-cube2/cli", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/ec-cube2/cli.git", + "reference": "61e8803ef801dbfa8425abf84bcd9d0e59af62f4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ec-cube2/cli/zipball/61e8803ef801dbfa8425abf84bcd9d0e59af62f4", + "reference": "61e8803ef801dbfa8425abf84bcd9d0e59af62f4", + "shasum": "" + }, + "require": { + "ext-mbstring": "*", + "php": ">=5.3.3", + "symfony/config": "^2.8|^3.4|^4.4", + "symfony/console": "^2.8|^3.4|^4.4", + "symfony/dependency-injection": "^2.8|^3.4|^4.4", + "symfony/event-dispatcher": "^2.8|^3.4|^4.4" + }, + "require-dev": { + "composer/composer": "^1.0", + "ec-cube2/ec-cube2": "^2.13" + }, + "default-branch": true, + "bin": [ + "bin/eccube" + ], + "type": "library", + "autoload": { + "psr-4": { + "Eccube2\\": "src/Eccube2/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "LGPL-3.0" + ], + "authors": [ + { + "name": "Tsuyoshi Tsurushima" + } + ], + "description": "EC-CUBE2 Command.", + "support": { + "issues": "https://github.com/ec-cube2/cli/issues", + "source": "https://github.com/ec-cube2/cli/tree/master" + }, + "time": "2021-11-12T09:02:34+00:00" + }, { "name": "fzaninotto/faker", "version": "v1.9.2", @@ -1190,18 +1242,177 @@ "abandoned": true, "time": "2014-10-12T19:18:40+00:00" }, + { + "name": "nanasess/eccube2-fixture-generator", + "version": "dev-main", + "source": { + "type": "git", + "url": "https://github.com/nanasess/eccube2-fixture-generator.git", + "reference": "e963ddfe0ff990cce9948f2cb8c615ce0721fd3c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nanasess/eccube2-fixture-generator/zipball/e963ddfe0ff990cce9948f2cb8c615ce0721fd3c", + "reference": "e963ddfe0ff990cce9948f2cb8c615ce0721fd3c", + "shasum": "" + }, + "require": { + "ec-cube2/cli": "*" + }, + "require-dev": { + "ec-cube2/ec-cube2": "*", + "fzaninotto/faker": "^1.8" + }, + "default-branch": true, + "type": "library", + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Eccube2\\Command\\": "src/Command", + "Eccube2\\Tests\\Fixture\\": "tests/Fixture" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "LGPL-3.0" + ], + "authors": [ + { + "name": "Kentaro Ohkouchi", + "email": "nanasess@fsm.ne.jp" + } + ], + "support": { + "issues": "https://github.com/nanasess/eccube2-fixture-generator/issues", + "source": "https://github.com/nanasess/eccube2-fixture-generator/tree/main" + }, + "time": "2021-11-15T05:05:26+00:00" + }, + { + "name": "php5friends/global-state11", + "version": "1.1.2", + "source": { + "type": "git", + "url": "https://github.com/php5friends/global-state11.git", + "reference": "5a07c40503d13e1cb84935bc19e10c8667020e06" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php5friends/global-state11/zipball/5a07c40503d13e1cb84935bc19e10c8667020e06", + "reference": "5a07c40503d13e1cb84935bc19e10c8667020e06", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "replace": { + "sebastian/global-state": "*" + }, + "require-dev": { + "php5friends/phpunit48": "^4.8" + }, + "suggest": { + "ext-uopz": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Snapshotting of global state", + "homepage": "http://www.github.com/php5friends/global-state11", + "keywords": [ + "global state" + ], + "support": { + "source": "https://github.com/php5friends/global-state11/tree/1.1.2" + }, + "time": "2021-10-11T08:24:38+00:00" + }, + { + "name": "php5friends/php-file-iterator14", + "version": "1.4.6", + "source": { + "type": "git", + "url": "https://github.com/php5friends/php-file-iterator14.git", + "reference": "b47aa03e2ebbbea247c05de7998edc44421b3699" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php5friends/php-file-iterator14/zipball/b47aa03e2ebbbea247c05de7998edc44421b3699", + "reference": "b47aa03e2ebbbea247c05de7998edc44421b3699", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "replace": { + "phpunit/php-file-iterator": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "FilterIterator implementation that filters files based on a list of suffixes.", + "homepage": "https://github.com/php5friends/php-file-iterator14/", + "keywords": [ + "filesystem", + "iterator" + ], + "support": { + "issues": "https://github.com/php5friends/php-file-iterator14/issues", + "source": "https://github.com/php5friends/php-file-iterator14/tree/1.4.6" + }, + "time": "2021-10-11T07:48:45+00:00" + }, { "name": "php5friends/phpunit48", - "version": "4.8.42", + "version": "4.8.43", "source": { "type": "git", "url": "https://github.com/php5friends/phpunit48.git", - "reference": "d58d5b4dc86c6790d790c244849125164053dfec" + "reference": "a1c5a88b7649c2d1be4d44dddc0db4ffbfed4eb8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php5friends/phpunit48/zipball/d58d5b4dc86c6790d790c244849125164053dfec", - "reference": "d58d5b4dc86c6790d790c244849125164053dfec", + "url": "https://api.github.com/repos/php5friends/phpunit48/zipball/a1c5a88b7649c2d1be4d44dddc0db4ffbfed4eb8", + "reference": "a1c5a88b7649c2d1be4d44dddc0db4ffbfed4eb8", "shasum": "" }, "require": { @@ -1210,10 +1421,11 @@ "ext-pcre": "*", "ext-reflection": "*", "ext-spl": "*", - "php": ">=5.3.3", + "php": ">=5.3.3 || ^7 || ^8", + "php5friends/global-state11": "~1.1.2", + "php5friends/php-file-iterator14": "~1.4.6", "phpspec/prophecy": "^1.3.1", "phpunit/php-code-coverage": "~2.1", - "phpunit/php-file-iterator": "~1.4", "phpunit/php-text-template": "~1.2", "phpunit/php-timer": "^1.0.6", "phpunit/phpunit-mock-objects": "~2.3", @@ -1221,9 +1433,8 @@ "sebastian/diff": "~1.2", "sebastian/environment": "~1.3", "sebastian/exporter": "~1.2", - "sebastian/global-state": "~1.0", "sebastian/version": "~1.0", - "symfony/yaml": "~2.1|~3.0" + "symfony/yaml": "^2.0 || ^3.0 || ^4.0 || ^5.0" }, "replace": { "phpunit/phpunit": "*" @@ -1265,9 +1476,9 @@ ], "support": { "issues": "https://github.com/php5friends/phpunit48/issues", - "source": "https://github.com/php5friends/phpunit48/tree/4.8.42" + "source": "https://github.com/php5friends/phpunit48/tree/4.8.43" }, - "time": "2020-10-17T02:31:13+00:00" + "time": "2021-10-28T05:14:50+00:00" }, { "name": "phpdocumentor/reflection-docblock", @@ -1456,58 +1667,6 @@ }, "time": "2015-10-06T15:47:00+00:00" }, - { - "name": "phpunit/php-file-iterator", - "version": "1.4.5", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/730b01bc3e867237eaac355e06a36b85dd93a8b4", - "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.4.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" - } - ], - "description": "FilterIterator implementation that filters files based on a list of suffixes.", - "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", - "keywords": [ - "filesystem", - "iterator" - ], - "support": { - "irc": "irc://irc.freenode.net/phpunit", - "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", - "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/1.4.5" - }, - "time": "2017-11-27T13:52:08+00:00" - }, { "name": "phpunit/php-text-template", "version": "1.2.1", @@ -1722,6 +1881,56 @@ "abandoned": true, "time": "2015-10-02T06:51:40+00:00" }, + { + "name": "psr/log", + "version": "1.1.4", + "source": { + "type": "git", + "url": "https://github.com/php-fig/log.git", + "reference": "d49695b909c3b7628b6289db5479a1c204601f11" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11", + "reference": "d49695b909c3b7628b6289db5479a1c204601f11", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Log\\": "Psr/Log/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for logging libraries", + "homepage": "https://github.com/php-fig/log", + "keywords": [ + "log", + "psr", + "psr-3" + ], + "support": { + "source": "https://github.com/php-fig/log/tree/1.1.4" + }, + "time": "2021-05-03T11:20:27+00:00" + }, { "name": "react/promise", "version": "v2.8.0", @@ -2022,32 +2231,29 @@ "time": "2016-06-17T09:04:28+00:00" }, { - "name": "sebastian/global-state", - "version": "1.1.1", + "name": "sebastian/recursion-context", + "version": "1.0.5", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4" + "url": "https://github.com/sebastianbergmann/recursion-context.git", + "reference": "b19cc3298482a335a95f3016d2f8a6950f0fbcd7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bc37d50fea7d017d3d340f230811c9f1d7280af4", - "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/b19cc3298482a335a95f3016d2f8a6950f0fbcd7", + "reference": "b19cc3298482a335a95f3016d2f8a6950f0fbcd7", "shasum": "" }, "require": { "php": ">=5.3.3" }, "require-dev": { - "phpunit/phpunit": "~4.2" - }, - "suggest": { - "ext-uopz": "*" + "phpunit/phpunit": "~4.4" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-master": "1.0.x-dev" } }, "autoload": { @@ -2060,117 +2266,431 @@ "BSD-3-Clause" ], "authors": [ + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, { "name": "Sebastian Bergmann", "email": "sebastian@phpunit.de" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" } ], - "description": "Snapshotting of global state", - "homepage": "http://www.github.com/sebastianbergmann/global-state", - "keywords": [ - "global state" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/global-state/issues", - "source": "https://github.com/sebastianbergmann/global-state/tree/1.1.1" + "description": "Provides functionality to recursively process PHP variables", + "homepage": "http://www.github.com/sebastianbergmann/recursion-context", + "support": { + "issues": "https://github.com/sebastianbergmann/recursion-context/issues", + "source": "https://github.com/sebastianbergmann/recursion-context/tree/master" }, - "time": "2015-10-12T03:26:01+00:00" + "time": "2016-10-03T07:41:43+00:00" }, { - "name": "sebastian/recursion-context", - "version": "1.0.5", + "name": "sebastian/version", + "version": "1.0.6", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "b19cc3298482a335a95f3016d2f8a6950f0fbcd7" + "url": "https://github.com/sebastianbergmann/version.git", + "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/b19cc3298482a335a95f3016d2f8a6950f0fbcd7", - "reference": "b19cc3298482a335a95f3016d2f8a6950f0fbcd7", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/58b3a85e7999757d6ad81c787a1fbf5ff6c628c6", + "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6", + "shasum": "" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library that helps with managing the version number of Git-hosted PHP projects", + "homepage": "https://github.com/sebastianbergmann/version", + "support": { + "issues": "https://github.com/sebastianbergmann/version/issues", + "source": "https://github.com/sebastianbergmann/version/tree/1.0.6" + }, + "time": "2015-06-21T13:59:46+00:00" + }, + { + "name": "symfony/config", + "version": "v2.8.52", + "source": { + "type": "git", + "url": "https://github.com/symfony/config.git", + "reference": "7dd5f5040dc04c118d057fb5886563963eb70011" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/config/zipball/7dd5f5040dc04c118d057fb5886563963eb70011", + "reference": "7dd5f5040dc04c118d057fb5886563963eb70011", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=5.3.9", + "symfony/filesystem": "~2.3|~3.0.0", + "symfony/polyfill-ctype": "~1.8" }, "require-dev": { - "phpunit/phpunit": "~4.4" + "symfony/yaml": "~2.7|~3.0.0" + }, + "suggest": { + "symfony/yaml": "To use the yaml reference dumper" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "2.8-dev" } }, "autoload": { - "classmap": [ - "src/" + "psr-4": { + "Symfony\\Component\\Config\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" + "name": "Fabien Potencier", + "email": "fabien@symfony.com" }, { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Config Component", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/config/tree/v2.8.50" + }, + "time": "2018-11-26T09:38:12+00:00" + }, + { + "name": "symfony/console", + "version": "v2.8.52", + "source": { + "type": "git", + "url": "https://github.com/symfony/console.git", + "reference": "cbcf4b5e233af15cd2bbd50dee1ccc9b7927dc12" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/console/zipball/cbcf4b5e233af15cd2bbd50dee1ccc9b7927dc12", + "reference": "cbcf4b5e233af15cd2bbd50dee1ccc9b7927dc12", + "shasum": "" + }, + "require": { + "php": ">=5.3.9", + "symfony/debug": "^2.7.2|~3.0.0", + "symfony/polyfill-mbstring": "~1.0" + }, + "require-dev": { + "psr/log": "~1.0", + "symfony/event-dispatcher": "~2.1|~3.0.0", + "symfony/process": "~2.1|~3.0.0" + }, + "suggest": { + "psr/log-implementation": "For using the console logger", + "symfony/event-dispatcher": "", + "symfony/process": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.8-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Console\\": "" }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ { - "name": "Adam Harvey", - "email": "aharvey@php.net" + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], - "description": "Provides functionality to recursively process PHP variables", - "homepage": "http://www.github.com/sebastianbergmann/recursion-context", + "description": "Symfony Console Component", + "homepage": "https://symfony.com", "support": { - "issues": "https://github.com/sebastianbergmann/recursion-context/issues", - "source": "https://github.com/sebastianbergmann/recursion-context/tree/master" + "source": "https://github.com/symfony/console/tree/v2.8.52" }, - "time": "2016-10-03T07:41:43+00:00" + "time": "2018-11-20T15:55:20+00:00" }, { - "name": "sebastian/version", - "version": "1.0.6", + "name": "symfony/debug", + "version": "v2.8.52", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/version.git", - "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6" + "url": "https://github.com/symfony/debug.git", + "reference": "74251c8d50dd3be7c4ce0c7b862497cdc641a5d0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/58b3a85e7999757d6ad81c787a1fbf5ff6c628c6", - "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6", + "url": "https://api.github.com/repos/symfony/debug/zipball/74251c8d50dd3be7c4ce0c7b862497cdc641a5d0", + "reference": "74251c8d50dd3be7c4ce0c7b862497cdc641a5d0", "shasum": "" }, + "require": { + "php": ">=5.3.9", + "psr/log": "~1.0" + }, + "conflict": { + "symfony/http-kernel": ">=2.3,<2.3.24|~2.4.0|>=2.5,<2.5.9|>=2.6,<2.6.2" + }, + "require-dev": { + "symfony/class-loader": "~2.2|~3.0.0", + "symfony/http-kernel": "~2.3.24|~2.5.9|^2.6.2|~3.0.0" + }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.8-dev" + } + }, "autoload": { - "classmap": [ - "src/" + "psr-4": { + "Symfony\\Component\\Debug\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], - "description": "Library that helps with managing the version number of Git-hosted PHP projects", - "homepage": "https://github.com/sebastianbergmann/version", + "description": "Symfony Debug Component", + "homepage": "https://symfony.com", "support": { - "issues": "https://github.com/sebastianbergmann/version/issues", - "source": "https://github.com/sebastianbergmann/version/tree/1.0.6" + "source": "https://github.com/symfony/debug/tree/v2.8.50" }, - "time": "2015-06-21T13:59:46+00:00" + "time": "2018-11-11T11:18:13+00:00" + }, + { + "name": "symfony/dependency-injection", + "version": "v2.8.52", + "source": { + "type": "git", + "url": "https://github.com/symfony/dependency-injection.git", + "reference": "c306198fee8f872a8f5f031e6e4f6f83086992d8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/c306198fee8f872a8f5f031e6e4f6f83086992d8", + "reference": "c306198fee8f872a8f5f031e6e4f6f83086992d8", + "shasum": "" + }, + "require": { + "php": ">=5.3.9" + }, + "conflict": { + "symfony/expression-language": "<2.6" + }, + "require-dev": { + "symfony/config": "~2.2|~3.0.0", + "symfony/expression-language": "~2.6|~3.0.0", + "symfony/yaml": "~2.3.42|~2.7.14|~2.8.7|~3.0.7" + }, + "suggest": { + "symfony/config": "", + "symfony/expression-language": "For using expressions in service container configuration", + "symfony/proxy-manager-bridge": "Generate service proxies to lazy load them", + "symfony/yaml": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.8-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\DependencyInjection\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony DependencyInjection Component", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/dependency-injection/tree/2.8" + }, + "time": "2019-04-16T11:33:46+00:00" + }, + { + "name": "symfony/event-dispatcher", + "version": "v2.8.52", + "source": { + "type": "git", + "url": "https://github.com/symfony/event-dispatcher.git", + "reference": "a77e974a5fecb4398833b0709210e3d5e334ffb0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/a77e974a5fecb4398833b0709210e3d5e334ffb0", + "reference": "a77e974a5fecb4398833b0709210e3d5e334ffb0", + "shasum": "" + }, + "require": { + "php": ">=5.3.9" + }, + "require-dev": { + "psr/log": "~1.0", + "symfony/config": "^2.0.5|~3.0.0", + "symfony/dependency-injection": "~2.6|~3.0.0", + "symfony/expression-language": "~2.6|~3.0.0", + "symfony/stopwatch": "~2.3|~3.0.0" + }, + "suggest": { + "symfony/dependency-injection": "", + "symfony/http-kernel": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.8-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\EventDispatcher\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony EventDispatcher Component", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/event-dispatcher/tree/v2.8.50" + }, + "time": "2018-11-21T14:20:20+00:00" + }, + { + "name": "symfony/filesystem", + "version": "v2.8.52", + "source": { + "type": "git", + "url": "https://github.com/symfony/filesystem.git", + "reference": "7ae46872dad09dffb7fe1e93a0937097339d0080" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/7ae46872dad09dffb7fe1e93a0937097339d0080", + "reference": "7ae46872dad09dffb7fe1e93a0937097339d0080", + "shasum": "" + }, + "require": { + "php": ">=5.3.9", + "symfony/polyfill-ctype": "~1.8" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.8-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Filesystem\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Filesystem Component", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/filesystem/tree/v2.8.52" + }, + "time": "2018-11-11T11:18:13+00:00" }, { "name": "symfony/polyfill-ctype", @@ -2251,6 +2771,86 @@ ], "time": "2020-10-23T09:01:57+00:00" }, + { + "name": "symfony/polyfill-mbstring", + "version": "v1.19.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "b5f7b932ee6fa802fc792eabd77c4c88084517ce" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/b5f7b932ee6fa802fc792eabd77c4c88084517ce", + "reference": "b5f7b932ee6fa802fc792eabd77c4c88084517ce", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.19-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for the Mbstring extension", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "mbstring", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.19.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2020-10-23T09:01:57+00:00" + }, { "name": "symfony/yaml", "version": "v2.8.52", @@ -2308,7 +2908,9 @@ "aliases": [], "minimum-stability": "stable", "stability-flags": { - "silverorange/mdb2": 10 + "silverorange/mdb2": 10, + "ec-cube2/cli": 20, + "nanasess/eccube2-fixture-generator": 20 }, "prefer-stable": false, "prefer-lowest": false, @@ -2321,5 +2923,5 @@ "platform-overrides": { "php": "5.4.16" }, - "plugin-api-version": "2.1.0" + "plugin-api-version": "2.0.0" } diff --git a/ctests/_bootstrap.php b/ctests/_bootstrap.php deleted file mode 100644 index f36fc70057..0000000000 --- a/ctests/_bootstrap.php +++ /dev/null @@ -1,2 +0,0 @@ - - - - - - -テスト店舗 - - - - - - - - - - - - - - - - - - - - -
>> /install/index.php は、インストール完了後にファイルを削除してください。
- -
-
-

現在のカゴの中

合計数量:0

商品金額:0円

カゴの中を見る
- - -

商品カテゴリ

-
-
- -
詳細はこちら
-

*

長い商品テスト長い商品テスト長い商品テスト長い商品テスト長い商品テスト

長い商品テスト長い商品テスト長い商品テスト長い商品テスト長い商品テスト

販売価格(税込): 1,980 円

たまには鍋でもどうでしょう。

アイスクリーム

アイスクリーム

販売価格(税込): 1,120 円

お口直しに。

-

新着情報RSS

2013年12月01日
サイトオープンいたしました!
一人暮らしからオフィスなどさまざまなシーンで あなたの生活をサポートするグッズをご家庭へお届けします!一人暮らしからオフィスなどさまざまなシーンで あなたの生活をサポートするグッズをご家庭へお届けします!一人暮らしからオフィスなどさまざまなシーンで あなたの生活をサポートするグッズをご家庭へお届けします!
- -
-
-

人気ランキング

-
-
- - 長い商品テスト長い商品テスト長い商品テスト長い商品テスト長い商品テスト - -
-
-

1.長い商品テスト長い商品テスト長い商品テスト長い商品テスト長い商品テスト

-

- 1,980 円 -

-
-
- - アイスクリーム - -
-
-

2.アイスクリーム

-
味:抹茶
-
大きさ:S
-

- 1,120 円 -

-
-
- - 発送日即日 - -
-
-

3.発送日即日

-

- 1,100 円 -

-
-
- - 発送日お取り寄せ - -
-
-

4.発送日お取り寄せ

-

- 1,200 円 -

-
-
- - おなべ - -
-
-

5.おなべ

-

- 1,333 円 -

-
-
-
-
-
- - -
- - \ No newline at end of file diff --git a/ctests/_support/AcceptanceHelper.php b/ctests/_support/AcceptanceHelper.php deleted file mode 100644 index ed5f2393d1..0000000000 --- a/ctests/_support/AcceptanceHelper.php +++ /dev/null @@ -1,10 +0,0 @@ - 0) { - $this->wait(3); - - return $this->getLastDownloadFile($fileNameRegex, $retryCount - 1, $downloadDir); - } - return false; - } - - return end($files); - } - - /** - * _blankで開いたウィンドウに切り替え - */ - public function switchToNewWindow() - { - $this->wait(1); - $this->executeInSelenium(function ($webdriver) { - $handles = $webdriver->getWindowHandles(); - $last_window = end($handles); - $webdriver->switchTo()->window($last_window); - }); - } -} diff --git a/ctests/_support/FunctionalHelper.php b/ctests/_support/FunctionalHelper.php deleted file mode 100644 index 00207a24b1..0000000000 --- a/ctests/_support/FunctionalHelper.php +++ /dev/null @@ -1,10 +0,0 @@ -config['url'], '/') . ':' . $this->config['port']; - // XXX FIX base_uri to base_url - // see https://github.com/captbaritone/codeception-mailcatcher-module/issues/28 - - $this->mailcatcher = new \GuzzleHttp\Client(['base_url' => $base_uri]); - - if (isset($this->config['guzzleRequestOptions'])) { - foreach ($this->config['guzzleRequestOptions'] as $option => $value) { - $this->mailcatcher->setDefaultOption($option, $value); - } - } - } - - protected function emailFromId($id) - { - $response = $this->mailcatcher->get("/messages/{$id}.json"); - $message = json_decode($response->getBody(), true); - - $message['source'] = quoted_printable_decode($message['source']); - $message['source'] = mb_convert_encoding($message['source'], 'UTF-8', 'JIS'); - return $message; - } -} diff --git a/ctests/_support/UnitHelper.php b/ctests/_support/UnitHelper.php deleted file mode 100644 index a630743fe6..0000000000 --- a/ctests/_support/UnitHelper.php +++ /dev/null @@ -1,10 +0,0 @@ -getScenario()->runStep(new \Codeception\Step\Action('setHeader', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Authenticates user for HTTP_AUTH - * - * @param $username - * @param $password - * @see \Codeception\Module\PhpBrowser::amHttpAuthenticated() - */ - public function amHttpAuthenticated($username, $password) { - return $this->getScenario()->runStep(new \Codeception\Step\Condition('amHttpAuthenticated', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Open web page at the given absolute URL and sets its hostname as the base host. - * - * ``` php - * amOnUrl('http://codeception.com'); - * $I->amOnPage('/quickstart'); // moves to http://codeception.com/quickstart - * ?> - * ``` - * @see \Codeception\Module\PhpBrowser::amOnUrl() - */ - public function amOnUrl($url) { - return $this->getScenario()->runStep(new \Codeception\Step\Condition('amOnUrl', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Changes the subdomain for the 'url' configuration parameter. - * Does not open a page; use `amOnPage` for that. - * - * ``` php - * amOnSubdomain('user'); - * $I->amOnPage('/'); - * // moves to http://user.mysite.com/ - * ?> - * ``` - * - * @param $subdomain - * - * @return mixed - * @see \Codeception\Module\PhpBrowser::amOnSubdomain() - */ - public function amOnSubdomain($subdomain) { - return $this->getScenario()->runStep(new \Codeception\Step\Condition('amOnSubdomain', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Low-level API method. - * If Codeception commands are not enough, use [Guzzle HTTP Client](http://guzzlephp.org/) methods directly - * - * Example: - * - * ``` php - * executeInGuzzle(function (\GuzzleHttp\Client $client) { - * $client->get('/get', ['query' => ['foo' => 'bar']]); - * }); - * ?> - * ``` - * - * It is not recommended to use this command on a regular basis. - * If Codeception lacks important Guzzle Client methods, implement them and submit patches. - * - * @param callable $function - * @see \Codeception\Module\PhpBrowser::executeInGuzzle() - */ - public function executeInGuzzle($function) { - return $this->getScenario()->runStep(new \Codeception\Step\Action('executeInGuzzle', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Sets the HTTP header to the passed value - which is used on - * subsequent HTTP requests through PhpBrowser. - * - * Example: - * ```php - * setHeader('X-Requested-With', 'Codeception'); - * $I->amOnPage('test-headers.php'); - * ?> - * ``` - * - * @param string $name the name of the request header - * @param string $value the value to set it to for subsequent - * requests - * @see \Codeception\Lib\InnerBrowser::haveHttpHeader() - */ - public function haveHttpHeader($name, $value) { - return $this->getScenario()->runStep(new \Codeception\Step\Action('haveHttpHeader', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Deletes the header with the passed name. Subsequent requests - * will not have the deleted header in its request. - * - * Example: - * ```php - * haveHttpHeader('X-Requested-With', 'Codeception'); - * $I->amOnPage('test-headers.php'); - * // ... - * $I->deleteHeader('X-Requested-With'); - * $I->amOnPage('some-other-page.php'); - * ?> - * ``` - * - * @param string $name the name of the header to delete. - * @see \Codeception\Lib\InnerBrowser::deleteHeader() - */ - public function deleteHeader($name) { - return $this->getScenario()->runStep(new \Codeception\Step\Action('deleteHeader', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Opens the page for the given relative URI. - * - * ``` php - * amOnPage('/'); - * // opens /register page - * $I->amOnPage('/register'); - * ``` - * - * @param $page - * @see \Codeception\Lib\InnerBrowser::amOnPage() - */ - public function amOnPage($page) { - return $this->getScenario()->runStep(new \Codeception\Step\Condition('amOnPage', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Perform a click on a link or a button, given by a locator. - * If a fuzzy locator is given, the page will be searched for a button, link, or image matching the locator string. - * For buttons, the "value" attribute, "name" attribute, and inner text are searched. - * For links, the link text is searched. - * For images, the "alt" attribute and inner text of any parent links are searched. - * - * The second parameter is a context (CSS or XPath locator) to narrow the search. - * - * Note that if the locator matches a button of type `submit`, the form will be submitted. - * - * ``` php - * click('Logout'); - * // button of form - * $I->click('Submit'); - * // CSS button - * $I->click('#form input[type=submit]'); - * // XPath - * $I->click('//form/*[@type=submit]'); - * // link in context - * $I->click('Logout', '#nav'); - * // using strict locator - * $I->click(['link' => 'Login']); - * ?> - * ``` - * - * @param $link - * @param $context - * @see \Codeception\Lib\InnerBrowser::click() - */ - public function click($link, $context = null) { - return $this->getScenario()->runStep(new \Codeception\Step\Action('click', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Checks that the current page contains the given string (case insensitive). - * - * You can specify a specific HTML element (via CSS or XPath) as the second - * parameter to only search within that element. - * - * ``` php - * see('Logout'); // I can suppose user is logged in - * $I->see('Sign Up', 'h1'); // I can suppose it's a signup page - * $I->see('Sign Up', '//body/h1'); // with XPath - * $I->see('Sign Up', ['css' => 'body h1']); // with strict CSS locator - * ``` - * - * Note that the search is done after stripping all HTML tags from the body, - * so `$I->see('strong')` will return true for strings like: - * - * - `

I am Stronger than thou

` - * - `` - * - * But will *not* be true for strings like: - * - * - `Home` - * - `
Home` - * - `` - * - * For checking the raw source code, use `seeInSource()`. - * - * @param $text - * @param null $selector - * Conditional Assertion: Test won't be stopped on fail - * @see \Codeception\Lib\InnerBrowser::see() - */ - public function canSee($text, $selector = null) { - return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('see', func_get_args())); - } - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Checks that the current page contains the given string (case insensitive). - * - * You can specify a specific HTML element (via CSS or XPath) as the second - * parameter to only search within that element. - * - * ``` php - * see('Logout'); // I can suppose user is logged in - * $I->see('Sign Up', 'h1'); // I can suppose it's a signup page - * $I->see('Sign Up', '//body/h1'); // with XPath - * $I->see('Sign Up', ['css' => 'body h1']); // with strict CSS locator - * ``` - * - * Note that the search is done after stripping all HTML tags from the body, - * so `$I->see('strong')` will return true for strings like: - * - * - `

I am Stronger than thou

` - * - `` - * - * But will *not* be true for strings like: - * - * - `Home` - * - `
Home` - * - `` - * - * For checking the raw source code, use `seeInSource()`. - * - * @param $text - * @param null $selector - * @see \Codeception\Lib\InnerBrowser::see() - */ - public function see($text, $selector = null) { - return $this->getScenario()->runStep(new \Codeception\Step\Assertion('see', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Checks that the current page doesn't contain the text specified (case insensitive). - * Give a locator as the second parameter to match a specific region. - * - * ```php - * dontSee('Login'); // I can suppose user is already logged in - * $I->dontSee('Sign Up','h1'); // I can suppose it's not a signup page - * $I->dontSee('Sign Up','//body/h1'); // with XPath - * $I->dontSee('Sign Up', ['css' => 'body h1']); // with strict CSS locator - * ``` - * - * Note that the search is done after stripping all HTML tags from the body, - * so `$I->dontSee('strong')` will fail on strings like: - * - * - `

I am Stronger than thou

` - * - `` - * - * But will ignore strings like: - * - * - `Home` - * - `
Home` - * - `` - * - * For checking the raw source code, use `seeInSource()`. - * - * @param $text - * @param null $selector - * Conditional Assertion: Test won't be stopped on fail - * @see \Codeception\Lib\InnerBrowser::dontSee() - */ - public function cantSee($text, $selector = null) { - return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSee', func_get_args())); - } - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Checks that the current page doesn't contain the text specified (case insensitive). - * Give a locator as the second parameter to match a specific region. - * - * ```php - * dontSee('Login'); // I can suppose user is already logged in - * $I->dontSee('Sign Up','h1'); // I can suppose it's not a signup page - * $I->dontSee('Sign Up','//body/h1'); // with XPath - * $I->dontSee('Sign Up', ['css' => 'body h1']); // with strict CSS locator - * ``` - * - * Note that the search is done after stripping all HTML tags from the body, - * so `$I->dontSee('strong')` will fail on strings like: - * - * - `

I am Stronger than thou

` - * - `` - * - * But will ignore strings like: - * - * - `Home` - * - `
Home` - * - `` - * - * For checking the raw source code, use `seeInSource()`. - * - * @param $text - * @param null $selector - * @see \Codeception\Lib\InnerBrowser::dontSee() - */ - public function dontSee($text, $selector = null) { - return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSee', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Checks that the current page contains the given string in its - * raw source code. - * - * ``` php - * seeInSource('

Green eggs & ham

'); - * ``` - * - * @param $raw - * Conditional Assertion: Test won't be stopped on fail - * @see \Codeception\Lib\InnerBrowser::seeInSource() - */ - public function canSeeInSource($raw) { - return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeInSource', func_get_args())); - } - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Checks that the current page contains the given string in its - * raw source code. - * - * ``` php - * seeInSource('

Green eggs & ham

'); - * ``` - * - * @param $raw - * @see \Codeception\Lib\InnerBrowser::seeInSource() - */ - public function seeInSource($raw) { - return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeInSource', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Checks that the current page contains the given string in its - * raw source code. - * - * ```php - * dontSeeInSource('

Green eggs & ham

'); - * ``` - * - * @param $raw - * Conditional Assertion: Test won't be stopped on fail - * @see \Codeception\Lib\InnerBrowser::dontSeeInSource() - */ - public function cantSeeInSource($raw) { - return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeInSource', func_get_args())); - } - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Checks that the current page contains the given string in its - * raw source code. - * - * ```php - * dontSeeInSource('

Green eggs & ham

'); - * ``` - * - * @param $raw - * @see \Codeception\Lib\InnerBrowser::dontSeeInSource() - */ - public function dontSeeInSource($raw) { - return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeInSource', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Checks that there's a link with the specified text. - * Give a full URL as the second parameter to match links with that exact URL. - * - * ``` php - * seeLink('Logout'); // matches Logout - * $I->seeLink('Logout','/logout'); // matches Logout - * ?> - * ``` - * - * @param $text - * @param null $url - * Conditional Assertion: Test won't be stopped on fail - * @see \Codeception\Lib\InnerBrowser::seeLink() - */ - public function canSeeLink($text, $url = null) { - return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeLink', func_get_args())); - } - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Checks that there's a link with the specified text. - * Give a full URL as the second parameter to match links with that exact URL. - * - * ``` php - * seeLink('Logout'); // matches Logout - * $I->seeLink('Logout','/logout'); // matches Logout - * ?> - * ``` - * - * @param $text - * @param null $url - * @see \Codeception\Lib\InnerBrowser::seeLink() - */ - public function seeLink($text, $url = null) { - return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeLink', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Checks that the page doesn't contain a link with the given string. - * If the second parameter is given, only links with a matching "href" attribute will be checked. - * - * ``` php - * dontSeeLink('Logout'); // I suppose user is not logged in - * $I->dontSeeLink('Checkout now', '/store/cart.php'); - * ?> - * ``` - * - * @param $text - * @param null $url - * Conditional Assertion: Test won't be stopped on fail - * @see \Codeception\Lib\InnerBrowser::dontSeeLink() - */ - public function cantSeeLink($text, $url = null) { - return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeLink', func_get_args())); - } - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Checks that the page doesn't contain a link with the given string. - * If the second parameter is given, only links with a matching "href" attribute will be checked. - * - * ``` php - * dontSeeLink('Logout'); // I suppose user is not logged in - * $I->dontSeeLink('Checkout now', '/store/cart.php'); - * ?> - * ``` - * - * @param $text - * @param null $url - * @see \Codeception\Lib\InnerBrowser::dontSeeLink() - */ - public function dontSeeLink($text, $url = null) { - return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeLink', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Checks that current URI contains the given string. - * - * ``` php - * seeInCurrentUrl('home'); - * // to match: /users/1 - * $I->seeInCurrentUrl('/users/'); - * ?> - * ``` - * - * @param $uri - * Conditional Assertion: Test won't be stopped on fail - * @see \Codeception\Lib\InnerBrowser::seeInCurrentUrl() - */ - public function canSeeInCurrentUrl($uri) { - return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeInCurrentUrl', func_get_args())); - } - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Checks that current URI contains the given string. - * - * ``` php - * seeInCurrentUrl('home'); - * // to match: /users/1 - * $I->seeInCurrentUrl('/users/'); - * ?> - * ``` - * - * @param $uri - * @see \Codeception\Lib\InnerBrowser::seeInCurrentUrl() - */ - public function seeInCurrentUrl($uri) { - return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeInCurrentUrl', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Checks that the current URI doesn't contain the given string. - * - * ``` php - * dontSeeInCurrentUrl('/users/'); - * ?> - * ``` - * - * @param $uri - * Conditional Assertion: Test won't be stopped on fail - * @see \Codeception\Lib\InnerBrowser::dontSeeInCurrentUrl() - */ - public function cantSeeInCurrentUrl($uri) { - return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeInCurrentUrl', func_get_args())); - } - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Checks that the current URI doesn't contain the given string. - * - * ``` php - * dontSeeInCurrentUrl('/users/'); - * ?> - * ``` - * - * @param $uri - * @see \Codeception\Lib\InnerBrowser::dontSeeInCurrentUrl() - */ - public function dontSeeInCurrentUrl($uri) { - return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeInCurrentUrl', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Checks that the current URL is equal to the given string. - * Unlike `seeInCurrentUrl`, this only matches the full URL. - * - * ``` php - * seeCurrentUrlEquals('/'); - * ?> - * ``` - * - * @param $uri - * Conditional Assertion: Test won't be stopped on fail - * @see \Codeception\Lib\InnerBrowser::seeCurrentUrlEquals() - */ - public function canSeeCurrentUrlEquals($uri) { - return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeCurrentUrlEquals', func_get_args())); - } - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Checks that the current URL is equal to the given string. - * Unlike `seeInCurrentUrl`, this only matches the full URL. - * - * ``` php - * seeCurrentUrlEquals('/'); - * ?> - * ``` - * - * @param $uri - * @see \Codeception\Lib\InnerBrowser::seeCurrentUrlEquals() - */ - public function seeCurrentUrlEquals($uri) { - return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeCurrentUrlEquals', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Checks that the current URL doesn't equal the given string. - * Unlike `dontSeeInCurrentUrl`, this only matches the full URL. - * - * ``` php - * dontSeeCurrentUrlEquals('/'); - * ?> - * ``` - * - * @param $uri - * Conditional Assertion: Test won't be stopped on fail - * @see \Codeception\Lib\InnerBrowser::dontSeeCurrentUrlEquals() - */ - public function cantSeeCurrentUrlEquals($uri) { - return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeCurrentUrlEquals', func_get_args())); - } - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Checks that the current URL doesn't equal the given string. - * Unlike `dontSeeInCurrentUrl`, this only matches the full URL. - * - * ``` php - * dontSeeCurrentUrlEquals('/'); - * ?> - * ``` - * - * @param $uri - * @see \Codeception\Lib\InnerBrowser::dontSeeCurrentUrlEquals() - */ - public function dontSeeCurrentUrlEquals($uri) { - return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeCurrentUrlEquals', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Checks that the current URL matches the given regular expression. - * - * ``` php - * seeCurrentUrlMatches('~$/users/(\d+)~'); - * ?> - * ``` - * - * @param $uri - * Conditional Assertion: Test won't be stopped on fail - * @see \Codeception\Lib\InnerBrowser::seeCurrentUrlMatches() - */ - public function canSeeCurrentUrlMatches($uri) { - return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeCurrentUrlMatches', func_get_args())); - } - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Checks that the current URL matches the given regular expression. - * - * ``` php - * seeCurrentUrlMatches('~$/users/(\d+)~'); - * ?> - * ``` - * - * @param $uri - * @see \Codeception\Lib\InnerBrowser::seeCurrentUrlMatches() - */ - public function seeCurrentUrlMatches($uri) { - return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeCurrentUrlMatches', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Checks that current url doesn't match the given regular expression. - * - * ``` php - * dontSeeCurrentUrlMatches('~$/users/(\d+)~'); - * ?> - * ``` - * - * @param $uri - * Conditional Assertion: Test won't be stopped on fail - * @see \Codeception\Lib\InnerBrowser::dontSeeCurrentUrlMatches() - */ - public function cantSeeCurrentUrlMatches($uri) { - return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeCurrentUrlMatches', func_get_args())); - } - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Checks that current url doesn't match the given regular expression. - * - * ``` php - * dontSeeCurrentUrlMatches('~$/users/(\d+)~'); - * ?> - * ``` - * - * @param $uri - * @see \Codeception\Lib\InnerBrowser::dontSeeCurrentUrlMatches() - */ - public function dontSeeCurrentUrlMatches($uri) { - return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeCurrentUrlMatches', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Executes the given regular expression against the current URI and returns the first match. - * If no parameters are provided, the full URI is returned. - * - * ``` php - * grabFromCurrentUrl('~$/user/(\d+)/~'); - * $uri = $I->grabFromCurrentUrl(); - * ?> - * ``` - * - * @param null $uri - * - * @return mixed - * @see \Codeception\Lib\InnerBrowser::grabFromCurrentUrl() - */ - public function grabFromCurrentUrl($uri = null) { - return $this->getScenario()->runStep(new \Codeception\Step\Action('grabFromCurrentUrl', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Checks that the specified checkbox is checked. - * - * ``` php - * seeCheckboxIsChecked('#agree'); // I suppose user agreed to terms - * $I->seeCheckboxIsChecked('#signup_form input[type=checkbox]'); // I suppose user agreed to terms, If there is only one checkbox in form. - * $I->seeCheckboxIsChecked('//form/input[@type=checkbox and @name=agree]'); - * ?> - * ``` - * - * @param $checkbox - * Conditional Assertion: Test won't be stopped on fail - * @see \Codeception\Lib\InnerBrowser::seeCheckboxIsChecked() - */ - public function canSeeCheckboxIsChecked($checkbox) { - return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeCheckboxIsChecked', func_get_args())); - } - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Checks that the specified checkbox is checked. - * - * ``` php - * seeCheckboxIsChecked('#agree'); // I suppose user agreed to terms - * $I->seeCheckboxIsChecked('#signup_form input[type=checkbox]'); // I suppose user agreed to terms, If there is only one checkbox in form. - * $I->seeCheckboxIsChecked('//form/input[@type=checkbox and @name=agree]'); - * ?> - * ``` - * - * @param $checkbox - * @see \Codeception\Lib\InnerBrowser::seeCheckboxIsChecked() - */ - public function seeCheckboxIsChecked($checkbox) { - return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeCheckboxIsChecked', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Check that the specified checkbox is unchecked. - * - * ``` php - * dontSeeCheckboxIsChecked('#agree'); // I suppose user didn't agree to terms - * $I->seeCheckboxIsChecked('#signup_form input[type=checkbox]'); // I suppose user didn't check the first checkbox in form. - * ?> - * ``` - * - * @param $checkbox - * Conditional Assertion: Test won't be stopped on fail - * @see \Codeception\Lib\InnerBrowser::dontSeeCheckboxIsChecked() - */ - public function cantSeeCheckboxIsChecked($checkbox) { - return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeCheckboxIsChecked', func_get_args())); - } - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Check that the specified checkbox is unchecked. - * - * ``` php - * dontSeeCheckboxIsChecked('#agree'); // I suppose user didn't agree to terms - * $I->seeCheckboxIsChecked('#signup_form input[type=checkbox]'); // I suppose user didn't check the first checkbox in form. - * ?> - * ``` - * - * @param $checkbox - * @see \Codeception\Lib\InnerBrowser::dontSeeCheckboxIsChecked() - */ - public function dontSeeCheckboxIsChecked($checkbox) { - return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeCheckboxIsChecked', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Checks that the given input field or textarea contains the given value. - * For fuzzy locators, fields are matched by label text, the "name" attribute, CSS, and XPath. - * - * ``` php - * seeInField('Body','Type your comment here'); - * $I->seeInField('form textarea[name=body]','Type your comment here'); - * $I->seeInField('form input[type=hidden]','hidden_value'); - * $I->seeInField('#searchform input','Search'); - * $I->seeInField('//form/*[@name=search]','Search'); - * $I->seeInField(['name' => 'search'], 'Search'); - * ?> - * ``` - * - * @param $field - * @param $value - * Conditional Assertion: Test won't be stopped on fail - * @see \Codeception\Lib\InnerBrowser::seeInField() - */ - public function canSeeInField($field, $value) { - return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeInField', func_get_args())); - } - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Checks that the given input field or textarea contains the given value. - * For fuzzy locators, fields are matched by label text, the "name" attribute, CSS, and XPath. - * - * ``` php - * seeInField('Body','Type your comment here'); - * $I->seeInField('form textarea[name=body]','Type your comment here'); - * $I->seeInField('form input[type=hidden]','hidden_value'); - * $I->seeInField('#searchform input','Search'); - * $I->seeInField('//form/*[@name=search]','Search'); - * $I->seeInField(['name' => 'search'], 'Search'); - * ?> - * ``` - * - * @param $field - * @param $value - * @see \Codeception\Lib\InnerBrowser::seeInField() - */ - public function seeInField($field, $value) { - return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeInField', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Checks that an input field or textarea doesn't contain the given value. - * For fuzzy locators, the field is matched by label text, CSS and XPath. - * - * ``` php - * dontSeeInField('Body','Type your comment here'); - * $I->dontSeeInField('form textarea[name=body]','Type your comment here'); - * $I->dontSeeInField('form input[type=hidden]','hidden_value'); - * $I->dontSeeInField('#searchform input','Search'); - * $I->dontSeeInField('//form/*[@name=search]','Search'); - * $I->dontSeeInField(['name' => 'search'], 'Search'); - * ?> - * ``` - * - * @param $field - * @param $value - * Conditional Assertion: Test won't be stopped on fail - * @see \Codeception\Lib\InnerBrowser::dontSeeInField() - */ - public function cantSeeInField($field, $value) { - return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeInField', func_get_args())); - } - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Checks that an input field or textarea doesn't contain the given value. - * For fuzzy locators, the field is matched by label text, CSS and XPath. - * - * ``` php - * dontSeeInField('Body','Type your comment here'); - * $I->dontSeeInField('form textarea[name=body]','Type your comment here'); - * $I->dontSeeInField('form input[type=hidden]','hidden_value'); - * $I->dontSeeInField('#searchform input','Search'); - * $I->dontSeeInField('//form/*[@name=search]','Search'); - * $I->dontSeeInField(['name' => 'search'], 'Search'); - * ?> - * ``` - * - * @param $field - * @param $value - * @see \Codeception\Lib\InnerBrowser::dontSeeInField() - */ - public function dontSeeInField($field, $value) { - return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeInField', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Checks if the array of form parameters (name => value) are set on the form matched with the - * passed selector. - * - * ``` php - * seeInFormFields('form[name=myform]', [ - * 'input1' => 'value', - * 'input2' => 'other value', - * ]); - * ?> - * ``` - * - * For multi-select elements, or to check values of multiple elements with the same name, an - * array may be passed: - * - * ``` php - * seeInFormFields('.form-class', [ - * 'multiselect' => [ - * 'value1', - * 'value2', - * ], - * 'checkbox[]' => [ - * 'a checked value', - * 'another checked value', - * ], - * ]); - * ?> - * ``` - * - * Additionally, checkbox values can be checked with a boolean. - * - * ``` php - * seeInFormFields('#form-id', [ - * 'checkbox1' => true, // passes if checked - * 'checkbox2' => false, // passes if unchecked - * ]); - * ?> - * ``` - * - * Pair this with submitForm for quick testing magic. - * - * ``` php - * 'value', - * 'field2' => 'another value', - * 'checkbox1' => true, - * // ... - * ]; - * $I->submitForm('//form[@id=my-form]', $form, 'submitButton'); - * // $I->amOnPage('/path/to/form-page') may be needed - * $I->seeInFormFields('//form[@id=my-form]', $form); - * ?> - * ``` - * - * @param $formSelector - * @param $params - * Conditional Assertion: Test won't be stopped on fail - * @see \Codeception\Lib\InnerBrowser::seeInFormFields() - */ - public function canSeeInFormFields($formSelector, $params) { - return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeInFormFields', func_get_args())); - } - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Checks if the array of form parameters (name => value) are set on the form matched with the - * passed selector. - * - * ``` php - * seeInFormFields('form[name=myform]', [ - * 'input1' => 'value', - * 'input2' => 'other value', - * ]); - * ?> - * ``` - * - * For multi-select elements, or to check values of multiple elements with the same name, an - * array may be passed: - * - * ``` php - * seeInFormFields('.form-class', [ - * 'multiselect' => [ - * 'value1', - * 'value2', - * ], - * 'checkbox[]' => [ - * 'a checked value', - * 'another checked value', - * ], - * ]); - * ?> - * ``` - * - * Additionally, checkbox values can be checked with a boolean. - * - * ``` php - * seeInFormFields('#form-id', [ - * 'checkbox1' => true, // passes if checked - * 'checkbox2' => false, // passes if unchecked - * ]); - * ?> - * ``` - * - * Pair this with submitForm for quick testing magic. - * - * ``` php - * 'value', - * 'field2' => 'another value', - * 'checkbox1' => true, - * // ... - * ]; - * $I->submitForm('//form[@id=my-form]', $form, 'submitButton'); - * // $I->amOnPage('/path/to/form-page') may be needed - * $I->seeInFormFields('//form[@id=my-form]', $form); - * ?> - * ``` - * - * @param $formSelector - * @param $params - * @see \Codeception\Lib\InnerBrowser::seeInFormFields() - */ - public function seeInFormFields($formSelector, $params) { - return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeInFormFields', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Checks if the array of form parameters (name => value) are not set on the form matched with - * the passed selector. - * - * ``` php - * dontSeeInFormFields('form[name=myform]', [ - * 'input1' => 'non-existent value', - * 'input2' => 'other non-existent value', - * ]); - * ?> - * ``` - * - * To check that an element hasn't been assigned any one of many values, an array can be passed - * as the value: - * - * ``` php - * dontSeeInFormFields('.form-class', [ - * 'fieldName' => [ - * 'This value shouldn\'t be set', - * 'And this value shouldn\'t be set', - * ], - * ]); - * ?> - * ``` - * - * Additionally, checkbox values can be checked with a boolean. - * - * ``` php - * dontSeeInFormFields('#form-id', [ - * 'checkbox1' => true, // fails if checked - * 'checkbox2' => false, // fails if unchecked - * ]); - * ?> - * ``` - * - * @param $formSelector - * @param $params - * Conditional Assertion: Test won't be stopped on fail - * @see \Codeception\Lib\InnerBrowser::dontSeeInFormFields() - */ - public function cantSeeInFormFields($formSelector, $params) { - return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeInFormFields', func_get_args())); - } - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Checks if the array of form parameters (name => value) are not set on the form matched with - * the passed selector. - * - * ``` php - * dontSeeInFormFields('form[name=myform]', [ - * 'input1' => 'non-existent value', - * 'input2' => 'other non-existent value', - * ]); - * ?> - * ``` - * - * To check that an element hasn't been assigned any one of many values, an array can be passed - * as the value: - * - * ``` php - * dontSeeInFormFields('.form-class', [ - * 'fieldName' => [ - * 'This value shouldn\'t be set', - * 'And this value shouldn\'t be set', - * ], - * ]); - * ?> - * ``` - * - * Additionally, checkbox values can be checked with a boolean. - * - * ``` php - * dontSeeInFormFields('#form-id', [ - * 'checkbox1' => true, // fails if checked - * 'checkbox2' => false, // fails if unchecked - * ]); - * ?> - * ``` - * - * @param $formSelector - * @param $params - * @see \Codeception\Lib\InnerBrowser::dontSeeInFormFields() - */ - public function dontSeeInFormFields($formSelector, $params) { - return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeInFormFields', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Submits the given form on the page, optionally with the given form - * values. Pass the form field's values as an array in the second - * parameter. - * - * Although this function can be used as a short-hand version of - * `fillField()`, `selectOption()`, `click()` etc. it has some important - * differences: - * - * * Only field *names* may be used, not CSS/XPath selectors nor field labels - * * If a field is sent to this function that does *not* exist on the page, - * it will silently be added to the HTTP request. This is helpful for testing - * some types of forms, but be aware that you will *not* get an exception - * like you would if you called `fillField()` or `selectOption()` with - * a missing field. - * - * Fields that are not provided will be filled by their values from the page, - * or from any previous calls to `fillField()`, `selectOption()` etc. - * You don't need to click the 'Submit' button afterwards. - * This command itself triggers the request to form's action. - * - * You can optionally specify which button's value to include - * in the request with the last parameter (as an alternative to - * explicitly setting its value in the second parameter), as - * button values are not otherwise included in the request. - * - * Examples: - * - * ``` php - * submitForm('#login', [ - * 'login' => 'davert', - * 'password' => '123456' - * ]); - * // or - * $I->submitForm('#login', [ - * 'login' => 'davert', - * 'password' => '123456' - * ], 'submitButtonName'); - * - * ``` - * - * For example, given this sample "Sign Up" form: - * - * ``` html - *
- * Login: - *
- * Password: - *
- * Do you agree to our terms? - *
- * Select pricing plan: - * - * - *
- * ``` - * - * You could write the following to submit it: - * - * ``` php - * submitForm( - * '#userForm', - * [ - * 'user' => [ - * 'login' => 'Davert', - * 'password' => '123456', - * 'agree' => true - * ] - * ], - * 'submitButton' - * ); - * ``` - * Note that "2" will be the submitted value for the "plan" field, as it is - * the selected option. - * - * You can also emulate a JavaScript submission by not specifying any - * buttons in the third parameter to submitForm. - * - * ```php - * submitForm( - * '#userForm', - * [ - * 'user' => [ - * 'login' => 'Davert', - * 'password' => '123456', - * 'agree' => true - * ] - * ] - * ); - * ``` - * - * This function works well when paired with `seeInFormFields()` - * for quickly testing CRUD interfaces and form validation logic. - * - * ``` php - * 'value', - * 'field2' => 'another value', - * 'checkbox1' => true, - * // ... - * ]; - * $I->submitForm('#my-form', $form, 'submitButton'); - * // $I->amOnPage('/path/to/form-page') may be needed - * $I->seeInFormFields('#my-form', $form); - * ``` - * - * Parameter values can be set to arrays for multiple input fields - * of the same name, or multi-select combo boxes. For checkboxes, - * you can use either the string value or boolean `true`/`false` which will - * be replaced by the checkbox's value in the DOM. - * - * ``` php - * submitForm('#my-form', [ - * 'field1' => 'value', - * 'checkbox' => [ - * 'value of first checkbox', - * 'value of second checkbox', - * ], - * 'otherCheckboxes' => [ - * true, - * false, - * false - * ], - * 'multiselect' => [ - * 'first option value', - * 'second option value' - * ] - * ]); - * ``` - * - * Mixing string and boolean values for a checkbox's value is not supported - * and may produce unexpected results. - * - * Field names ending in `[]` must be passed without the trailing square - * bracket characters, and must contain an array for its value. This allows - * submitting multiple values with the same name, consider: - * - * ```php - * submitForm('#my-form', [ - * 'field[]' => 'value', - * 'field[]' => 'another value', // 'field[]' is already a defined key - * ]); - * ``` - * - * The solution is to pass an array value: - * - * ```php - * submitForm('#my-form', [ - * 'field' => [ - * 'value', - * 'another value', - * ] - * ]); - * ``` - * - * @param $selector - * @param $params - * @param $button - * @see \Codeception\Lib\InnerBrowser::submitForm() - */ - public function submitForm($selector, $params, $button = null) { - return $this->getScenario()->runStep(new \Codeception\Step\Action('submitForm', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Fills a text field or textarea with the given string. - * - * ``` php - * fillField("//input[@type='text']", "Hello World!"); - * $I->fillField(['name' => 'email'], 'jon@mail.com'); - * ?> - * ``` - * - * @param $field - * @param $value - * @see \Codeception\Lib\InnerBrowser::fillField() - */ - public function fillField($field, $value) { - return $this->getScenario()->runStep(new \Codeception\Step\Action('fillField', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Selects an option in a select tag or in radio button group. - * - * ``` php - * selectOption('form select[name=account]', 'Premium'); - * $I->selectOption('form input[name=payment]', 'Monthly'); - * $I->selectOption('//form/select[@name=account]', 'Monthly'); - * ?> - * ``` - * - * Provide an array for the second argument to select multiple options: - * - * ``` php - * selectOption('Which OS do you use?', array('Windows','Linux')); - * ?> - * ``` - * - * Or provide an associative array for the second argument to specifically define which selection method should be used: - * - * ``` php - * selectOption('Which OS do you use?', array('text' => 'Windows')); // Only search by text 'Windows' - * $I->selectOption('Which OS do you use?', array('value' => 'windows')); // Only search by value 'windows' - * ?> - * ``` - * - * @param $select - * @param $option - * @see \Codeception\Lib\InnerBrowser::selectOption() - */ - public function selectOption($select, $option) { - return $this->getScenario()->runStep(new \Codeception\Step\Action('selectOption', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Ticks a checkbox. For radio buttons, use the `selectOption` method instead. - * - * ``` php - * checkOption('#agree'); - * ?> - * ``` - * - * @param $option - * @see \Codeception\Lib\InnerBrowser::checkOption() - */ - public function checkOption($option) { - return $this->getScenario()->runStep(new \Codeception\Step\Action('checkOption', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Unticks a checkbox. - * - * ``` php - * uncheckOption('#notify'); - * ?> - * ``` - * - * @param $option - * @see \Codeception\Lib\InnerBrowser::uncheckOption() - */ - public function uncheckOption($option) { - return $this->getScenario()->runStep(new \Codeception\Step\Action('uncheckOption', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Attaches a file relative to the Codeception data directory to the given file upload field. - * - * ``` php - * attachFile('input[@type="file"]', 'prices.xls'); - * ?> - * ``` - * - * @param $field - * @param $filename - * @see \Codeception\Lib\InnerBrowser::attachFile() - */ - public function attachFile($field, $filename) { - return $this->getScenario()->runStep(new \Codeception\Step\Action('attachFile', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * If your page triggers an ajax request, you can perform it manually. - * This action sends a GET ajax request with specified params. - * - * See ->sendAjaxPostRequest for examples. - * - * @param $uri - * @param $params - * @see \Codeception\Lib\InnerBrowser::sendAjaxGetRequest() - */ - public function sendAjaxGetRequest($uri, $params = null) { - return $this->getScenario()->runStep(new \Codeception\Step\Action('sendAjaxGetRequest', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * If your page triggers an ajax request, you can perform it manually. - * This action sends a POST ajax request with specified params. - * Additional params can be passed as array. - * - * Example: - * - * Imagine that by clicking checkbox you trigger ajax request which updates user settings. - * We emulate that click by running this ajax request manually. - * - * ``` php - * sendAjaxPostRequest('/updateSettings', array('notifications' => true)); // POST - * $I->sendAjaxGetRequest('/updateSettings', array('notifications' => true)); // GET - * - * ``` - * - * @param $uri - * @param $params - * @see \Codeception\Lib\InnerBrowser::sendAjaxPostRequest() - */ - public function sendAjaxPostRequest($uri, $params = null) { - return $this->getScenario()->runStep(new \Codeception\Step\Action('sendAjaxPostRequest', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * If your page triggers an ajax request, you can perform it manually. - * This action sends an ajax request with specified method and params. - * - * Example: - * - * You need to perform an ajax request specifying the HTTP method. - * - * ``` php - * sendAjaxRequest('PUT', '/posts/7', array('title' => 'new title')); - * - * ``` - * - * @param $method - * @param $uri - * @param $params - * @see \Codeception\Lib\InnerBrowser::sendAjaxRequest() - */ - public function sendAjaxRequest($method, $uri, $params = null) { - return $this->getScenario()->runStep(new \Codeception\Step\Action('sendAjaxRequest', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Finds and returns the text contents of the given element. - * If a fuzzy locator is used, the element is found using CSS, XPath, - * and by matching the full page source by regular expression. - * - * ``` php - * grabTextFrom('h1'); - * $heading = $I->grabTextFrom('descendant-or-self::h1'); - * $value = $I->grabTextFrom('~ - * ``` - * - * @param $cssOrXPathOrRegex - * - * @return mixed - * @see \Codeception\Lib\InnerBrowser::grabTextFrom() - */ - public function grabTextFrom($cssOrXPathOrRegex) { - return $this->getScenario()->runStep(new \Codeception\Step\Action('grabTextFrom', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Grabs the value of the given attribute value from the given element. - * Fails if element is not found. - * - * ``` php - * grabAttributeFrom('#tooltip', 'title'); - * ?> - * ``` - * - * - * @param $cssOrXpath - * @param $attribute - * - * @return mixed - * @see \Codeception\Lib\InnerBrowser::grabAttributeFrom() - */ - public function grabAttributeFrom($cssOrXpath, $attribute) { - return $this->getScenario()->runStep(new \Codeception\Step\Action('grabAttributeFrom', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Grabs either the text content, or attribute values, of nodes - * matched by $cssOrXpath and returns them as an array. - * - * ```html - * First - * Second - * Third - * ``` - * - * ```php - * grabMultiple('a'); - * - * // would return ['#first', '#second', '#third'] - * $aLinks = $I->grabMultiple('a', 'href'); - * ?> - * ``` - * - * @param $cssOrXpath - * @param $attribute - * @return string[] - * @see \Codeception\Lib\InnerBrowser::grabMultiple() - */ - public function grabMultiple($cssOrXpath, $attribute = null) { - return $this->getScenario()->runStep(new \Codeception\Step\Action('grabMultiple', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * @param $field - * - * @return array|mixed|null|string - * @see \Codeception\Lib\InnerBrowser::grabValueFrom() - */ - public function grabValueFrom($field) { - return $this->getScenario()->runStep(new \Codeception\Step\Action('grabValueFrom', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Sets a cookie with the given name and value. - * You can set additional cookie params like `domain`, `path`, `expires`, `secure` in array passed as last argument. - * - * ``` php - * setCookie('PHPSESSID', 'el4ukv0kqbvoirg7nkp4dncpk3'); - * ?> - * ``` - * - * @param $name - * @param $val - * @param array $params - * - * @return mixed - * @see \Codeception\Lib\InnerBrowser::setCookie() - */ - public function setCookie($name, $val, $params = null) { - return $this->getScenario()->runStep(new \Codeception\Step\Action('setCookie', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Grabs a cookie value. - * You can set additional cookie params like `domain`, `path` in array passed as last argument. - * - * @param $cookie - * - * @param array $params - * @return mixed - * @see \Codeception\Lib\InnerBrowser::grabCookie() - */ - public function grabCookie($cookie, $params = null) { - return $this->getScenario()->runStep(new \Codeception\Step\Action('grabCookie', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Grabs current page source code. - * - * @throws ModuleException if no page was opened. - * - * @return string Current page source code. - * @see \Codeception\Lib\InnerBrowser::grabPageSource() - */ - public function grabPageSource() { - return $this->getScenario()->runStep(new \Codeception\Step\Action('grabPageSource', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Checks that a cookie with the given name is set. - * You can set additional cookie params like `domain`, `path` as array passed in last argument. - * - * ``` php - * seeCookie('PHPSESSID'); - * ?> - * ``` - * - * @param $cookie - * @param array $params - * @return mixed - * Conditional Assertion: Test won't be stopped on fail - * @see \Codeception\Lib\InnerBrowser::seeCookie() - */ - public function canSeeCookie($cookie, $params = null) { - return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeCookie', func_get_args())); - } - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Checks that a cookie with the given name is set. - * You can set additional cookie params like `domain`, `path` as array passed in last argument. - * - * ``` php - * seeCookie('PHPSESSID'); - * ?> - * ``` - * - * @param $cookie - * @param array $params - * @return mixed - * @see \Codeception\Lib\InnerBrowser::seeCookie() - */ - public function seeCookie($cookie, $params = null) { - return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeCookie', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Checks that there isn't a cookie with the given name. - * You can set additional cookie params like `domain`, `path` as array passed in last argument. - * - * @param $cookie - * - * @param array $params - * @return mixed - * Conditional Assertion: Test won't be stopped on fail - * @see \Codeception\Lib\InnerBrowser::dontSeeCookie() - */ - public function cantSeeCookie($cookie, $params = null) { - return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeCookie', func_get_args())); - } - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Checks that there isn't a cookie with the given name. - * You can set additional cookie params like `domain`, `path` as array passed in last argument. - * - * @param $cookie - * - * @param array $params - * @return mixed - * @see \Codeception\Lib\InnerBrowser::dontSeeCookie() - */ - public function dontSeeCookie($cookie, $params = null) { - return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeCookie', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Unsets cookie with the given name. - * You can set additional cookie params like `domain`, `path` in array passed as last argument. - * - * @param $cookie - * - * @param array $params - * @return mixed - * @see \Codeception\Lib\InnerBrowser::resetCookie() - */ - public function resetCookie($name, $params = null) { - return $this->getScenario()->runStep(new \Codeception\Step\Action('resetCookie', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Checks that the given element exists on the page and is visible. - * You can also specify expected attributes of this element. - * - * ``` php - * seeElement('.error'); - * $I->seeElement('//form/input[1]'); - * $I->seeElement('input', ['name' => 'login']); - * $I->seeElement('input', ['value' => '123456']); - * - * // strict locator in first arg, attributes in second - * $I->seeElement(['css' => 'form input'], ['name' => 'login']); - * ?> - * ``` - * - * @param $selector - * @param array $attributes - * @return - * Conditional Assertion: Test won't be stopped on fail - * @see \Codeception\Lib\InnerBrowser::seeElement() - */ - public function canSeeElement($selector, $attributes = null) { - return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeElement', func_get_args())); - } - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Checks that the given element exists on the page and is visible. - * You can also specify expected attributes of this element. - * - * ``` php - * seeElement('.error'); - * $I->seeElement('//form/input[1]'); - * $I->seeElement('input', ['name' => 'login']); - * $I->seeElement('input', ['value' => '123456']); - * - * // strict locator in first arg, attributes in second - * $I->seeElement(['css' => 'form input'], ['name' => 'login']); - * ?> - * ``` - * - * @param $selector - * @param array $attributes - * @return - * @see \Codeception\Lib\InnerBrowser::seeElement() - */ - public function seeElement($selector, $attributes = null) { - return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeElement', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Checks that the given element is invisible or not present on the page. - * You can also specify expected attributes of this element. - * - * ``` php - * dontSeeElement('.error'); - * $I->dontSeeElement('//form/input[1]'); - * $I->dontSeeElement('input', ['name' => 'login']); - * $I->dontSeeElement('input', ['value' => '123456']); - * ?> - * ``` - * - * @param $selector - * @param array $attributes - * Conditional Assertion: Test won't be stopped on fail - * @see \Codeception\Lib\InnerBrowser::dontSeeElement() - */ - public function cantSeeElement($selector, $attributes = null) { - return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeElement', func_get_args())); - } - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Checks that the given element is invisible or not present on the page. - * You can also specify expected attributes of this element. - * - * ``` php - * dontSeeElement('.error'); - * $I->dontSeeElement('//form/input[1]'); - * $I->dontSeeElement('input', ['name' => 'login']); - * $I->dontSeeElement('input', ['value' => '123456']); - * ?> - * ``` - * - * @param $selector - * @param array $attributes - * @see \Codeception\Lib\InnerBrowser::dontSeeElement() - */ - public function dontSeeElement($selector, $attributes = null) { - return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeElement', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Checks that there are a certain number of elements matched by the given locator on the page. - * - * ``` php - * seeNumberOfElements('tr', 10); - * $I->seeNumberOfElements('tr', [0,10]); //between 0 and 10 elements - * ?> - * ``` - * @param $selector - * @param mixed $expected : - * - string: strict number - * - array: range of numbers [0,10] - * Conditional Assertion: Test won't be stopped on fail - * @see \Codeception\Lib\InnerBrowser::seeNumberOfElements() - */ - public function canSeeNumberOfElements($selector, $expected) { - return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeNumberOfElements', func_get_args())); - } - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Checks that there are a certain number of elements matched by the given locator on the page. - * - * ``` php - * seeNumberOfElements('tr', 10); - * $I->seeNumberOfElements('tr', [0,10]); //between 0 and 10 elements - * ?> - * ``` - * @param $selector - * @param mixed $expected : - * - string: strict number - * - array: range of numbers [0,10] - * @see \Codeception\Lib\InnerBrowser::seeNumberOfElements() - */ - public function seeNumberOfElements($selector, $expected) { - return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeNumberOfElements', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Checks that the given option is selected. - * - * ``` php - * seeOptionIsSelected('#form input[name=payment]', 'Visa'); - * ?> - * ``` - * - * @param $selector - * @param $optionText - * - * @return mixed - * Conditional Assertion: Test won't be stopped on fail - * @see \Codeception\Lib\InnerBrowser::seeOptionIsSelected() - */ - public function canSeeOptionIsSelected($selector, $optionText) { - return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeOptionIsSelected', func_get_args())); - } - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Checks that the given option is selected. - * - * ``` php - * seeOptionIsSelected('#form input[name=payment]', 'Visa'); - * ?> - * ``` - * - * @param $selector - * @param $optionText - * - * @return mixed - * @see \Codeception\Lib\InnerBrowser::seeOptionIsSelected() - */ - public function seeOptionIsSelected($selector, $optionText) { - return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeOptionIsSelected', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Checks that the given option is not selected. - * - * ``` php - * dontSeeOptionIsSelected('#form input[name=payment]', 'Visa'); - * ?> - * ``` - * - * @param $selector - * @param $optionText - * - * @return mixed - * Conditional Assertion: Test won't be stopped on fail - * @see \Codeception\Lib\InnerBrowser::dontSeeOptionIsSelected() - */ - public function cantSeeOptionIsSelected($selector, $optionText) { - return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeOptionIsSelected', func_get_args())); - } - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Checks that the given option is not selected. - * - * ``` php - * dontSeeOptionIsSelected('#form input[name=payment]', 'Visa'); - * ?> - * ``` - * - * @param $selector - * @param $optionText - * - * @return mixed - * @see \Codeception\Lib\InnerBrowser::dontSeeOptionIsSelected() - */ - public function dontSeeOptionIsSelected($selector, $optionText) { - return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeOptionIsSelected', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Asserts that current page has 404 response status code. - * Conditional Assertion: Test won't be stopped on fail - * @see \Codeception\Lib\InnerBrowser::seePageNotFound() - */ - public function canSeePageNotFound() { - return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seePageNotFound', func_get_args())); - } - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Asserts that current page has 404 response status code. - * @see \Codeception\Lib\InnerBrowser::seePageNotFound() - */ - public function seePageNotFound() { - return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seePageNotFound', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Checks that response code is equal to value provided. - * - * ```php - * seeResponseCodeIs(200); - * - * // recommended \Codeception\Util\HttpCode - * $I->seeResponseCodeIs(\Codeception\Util\HttpCode::OK); - * ``` - * - * @param $code - * Conditional Assertion: Test won't be stopped on fail - * @see \Codeception\Lib\InnerBrowser::seeResponseCodeIs() - */ - public function canSeeResponseCodeIs($code) { - return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeResponseCodeIs', func_get_args())); - } - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Checks that response code is equal to value provided. - * - * ```php - * seeResponseCodeIs(200); - * - * // recommended \Codeception\Util\HttpCode - * $I->seeResponseCodeIs(\Codeception\Util\HttpCode::OK); - * ``` - * - * @param $code - * @see \Codeception\Lib\InnerBrowser::seeResponseCodeIs() - */ - public function seeResponseCodeIs($code) { - return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeResponseCodeIs', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Checks that response code is equal to value provided. - * - * ```php - * dontSeeResponseCodeIs(200); - * - * // recommended \Codeception\Util\HttpCode - * $I->dontSeeResponseCodeIs(\Codeception\Util\HttpCode::OK); - * ``` - * @param $code - * Conditional Assertion: Test won't be stopped on fail - * @see \Codeception\Lib\InnerBrowser::dontSeeResponseCodeIs() - */ - public function cantSeeResponseCodeIs($code) { - return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeResponseCodeIs', func_get_args())); - } - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Checks that response code is equal to value provided. - * - * ```php - * dontSeeResponseCodeIs(200); - * - * // recommended \Codeception\Util\HttpCode - * $I->dontSeeResponseCodeIs(\Codeception\Util\HttpCode::OK); - * ``` - * @param $code - * @see \Codeception\Lib\InnerBrowser::dontSeeResponseCodeIs() - */ - public function dontSeeResponseCodeIs($code) { - return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeResponseCodeIs', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Checks that the page title contains the given string. - * - * ``` php - * seeInTitle('Blog - Post #1'); - * ?> - * ``` - * - * @param $title - * - * @return mixed - * Conditional Assertion: Test won't be stopped on fail - * @see \Codeception\Lib\InnerBrowser::seeInTitle() - */ - public function canSeeInTitle($title) { - return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeInTitle', func_get_args())); - } - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Checks that the page title contains the given string. - * - * ``` php - * seeInTitle('Blog - Post #1'); - * ?> - * ``` - * - * @param $title - * - * @return mixed - * @see \Codeception\Lib\InnerBrowser::seeInTitle() - */ - public function seeInTitle($title) { - return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeInTitle', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Checks that the page title does not contain the given string. - * - * @param $title - * - * @return mixed - * Conditional Assertion: Test won't be stopped on fail - * @see \Codeception\Lib\InnerBrowser::dontSeeInTitle() - */ - public function cantSeeInTitle($title) { - return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeInTitle', func_get_args())); - } - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Checks that the page title does not contain the given string. - * - * @param $title - * - * @return mixed - * @see \Codeception\Lib\InnerBrowser::dontSeeInTitle() - */ - public function dontSeeInTitle($title) { - return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeInTitle', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Switch to iframe or frame on the page. - * - * Example: - * ``` html - *