大阪市北区に本社を置く、ベンチャー企業株式会社ロックオン!「アドエビス」「EC-CUBE」「THREe」など、多くのNo.1製品を輩出する会社の裏側をお見せします。
SimpleTest – Unit Testing for PHP symfonyのUnitTestにも使われているSimpleTestがその名の通りシンプルでいい感じです。 ダウンロードして解凍して適当なディレクトリに置くだけ。 ドキュメントにもサンプルは書いてありますが、CLI(シェル)で使うならこんな具合。 require_once 'simpletest/unit_tester.php'; require_once 'simpletest/reporter.php'; require_once 'Hoge.php'; // テストしたい対象 class Test_Of_Hoge extends UnitTestCase { public function __construct() { $this->UnitTestCase(); } public function testHog
CakePHP1.2 に SimpleTest をインストール で SimpleTest をインストールするところまでやったので、今度は実際にテストケースを作成してみます。 空のテストケースを作成する app/test/cases/models に user.test.php を作成して以下のコードで保存する。 <?php class UserTest extends User { } ?> test.php にアクセスして「App Test Cases」というリンクをクリックすると作成した user.test.php というリンクが表示されます。 この models/user.test.php をクリックすると作成したテストが実行されます。まだテストケースが何もないので当然テストは正常に終了します。 User モデルのテスト 実際にモデルのテストケースを作成してみます。 app/test
Category:Library | Category:Library -> Community | Category:Library -> Tests SimpleTester is a testing library for CodeIgniter, wrapping the SimpleTest framework. Installation instructions 1. Download SimpleTester 1.0 here: File:simpletester1.0.zip 2. Unzip file to the application folder. 3. Download the latest SimpleTest framework here. 4. Gunzip that file to application/libraries (a folder c
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く