【PHPフレームワーク】Ethna【スケルトン自動作成】at PHP【PHPフレームワーク】Ethna【スケルトン自動作成】 - 暇つぶし2ch■コピペモード□スレを通常表示□オプションモード□このスレッドのURL■項目テキスト662:661=657 06/11/29 23:29:07 一応現象が再現する最低限のコードを・・・。 任意のApplicationManager(仮にProject_FooManager.php)に 例外をthrowするだけのfunctionを追加 function thex() { thrown new exception ('exception test'); } コントローラに追加(include & 'foo' => 'Foo',) app/action/bar.phpのperformに try { $this->foo = $this->backend->getManager('foo'); $this->foo->thex(); } catch (exception $e) { $this->ae->addObject(null, $e); return 'error'; } return 'bar'; これでちゃんとerror.tplが表示されます。 次にethna add-action-test bar としてBarTest.phpに // barアクションの実装 $forward_name = $this->ac->perform(); $this->assertNotEqual($forward_name, 'error'); と書くとテストにはパスするが他に4つほどEceptionが表示されます。 こんな感じです。 663:nobodyさん 06/12/02 13:29:39 ttp://ethna.jp 鯖落ちてる? 次ページ最新レス表示レスジャンプ類似スレ一覧スレッドの検索話題のニュースおまかせリストオプションしおりを挟むスレッドに書込スレッドの一覧暇つぶし2ch