Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions ja/console-and-shells/cron-jobs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,21 @@ cron ジョブとして実行します。

cron ジョブで画面出力を非表示にするために ``-q`` (または `--quiet`) を使用してください。

共有ホスティング上の cron ジョブ
--------------------------------

いくつかの共有ホスティング上で ``cd /full/path/to/root && bin/cake myshell myparam``
は動作しません。代わりに ``php /full/path/to/root/bin/cake.php myshell myparam``
が使用できます。

.. note::
php.ini の中で ``register_argc_argv = 1`` を含めることによって、
register_argc_argv を有効にしなければなりません。グローバルに register_argc_argv
を変更できない場合、 ``-c /full/path/to/root/php.ini`` をつけることで、
cron ジョブに独自の設定ファイル (php.ini) を指定することができます。例: ``php -c
/full/path/to/root/php.ini /full/path/to/root/bin/cake.php myshell
myparam``

.. meta::
:title lang=ja: cron ジョブに登録してシェルを実行する
:keywords lang=ja: cron ジョブ,bash script,crontab
10 changes: 9 additions & 1 deletion ja/development/testing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ CakePHP におけるほとんどのことがそうであるように、テスト
マークすることでテストメソッドとすることもできます。

.. versionadded:: 3.4.1
PHPUnit6 のサポートが追加されました。5.7.0 より低いバージョンの PHPUnit を
PHPUnit 6 のサポートが追加されました。5.7.0 より低いバージョンの PHPUnit を
使用する場合、テストケースは Cake のクラスまたは ``PHPUnit_Framework_TestCase`` を
継承してください。

Expand Down Expand Up @@ -298,6 +298,14 @@ PHPUnit のインストール方法に合わせて ``phpunit`` コマンドを
これで、アプリケーションの webroot ディレクトリ内のカバレッジ結果を配置します。
``http://localhost/your_app/coverage`` にアクセスすると、結果を表示することができるはずです。

PHP 5.6.0 以上を利用している場合、カバレッジを生成するために xdebug の代わりに
`phpdbg <http://phpdbg.com/>`__ を使用できます。一般的にカバレッジの生成は
``phpdbg`` の方が速いです。

.. code-block:: bash

$ phpdbg -qrr phpunit --coverage-html webroot/coverage tests/TestCase/Model/Table/ArticlesTableTest

プラグインのテストスイートを組合わせ
------------------------------------

Expand Down