FileSyncプラグイン
PDT1.0.2からはローカルサーバにファイルをコピーする機能が
無くなったみたいなので、それに変わるプラグインを見つけた
これ、ファイルを編集して保存したら、
勝手にサーバにファイルコピーしてくれるので、かなり便利!
MacBook HDD換装後
MacBookのHDDを320GBに換装後、移せるものは移しつつ、
データ以外は再構築中。。。
とりあえず、現状のMacBookにインストールしたものを。
[開発ツール系]
- Firefox
- FoxMarks Bookmark Syncronizer
- GreaseMonkey
- Tab Mix Plus
- FireFTP
- Thunderbird
- Eclipse 3.3 (PDT All in One)
- iWork'08
- iLife'08
- Parallels Desctop 3
- Windows Vista Home Basic
[サービス系]
あとは-Adobe CS3 MASTER COLLECTIONを入れたらなんとか形になりそうや。
>自分
MacPortsからインストールしたものはすべて/opt配下に入ることをお忘れなく
HDDを320GBに換装してみた!
Western Digitalの320GBに換装してみた!
1万8000円也なんやけども、安くなったなぁとしみじみ。。。
空き容量、270GBほどで、現在、環境をイチからチマチマ復旧中です。
EthnaでSimpleTest(4)
ちゅーか、一週間ぐらいSimpleTestで悩んでる気がする。。。
ほんまにここまで悩むようなもんやねんやろか。。。
#自分の実力が足らんだけかと思ったりもするねんけど。。。。
とりあえずWebTestCaseを使って、
Indexページのテストロジックを作ってみた。
今作ってるのは携帯向けにRSSを取得して表示するもの。
デフォルトyahooのトップページを取得したりするもので、
まずはその部分のテストを実装してみたので、晒します。
もし、そんな風に実装するもんではないよというように
親切に教えてくださる方がいれば是非コメントください。。。
addHeader('User-Agent:KDDI-SA31 UP.Browser/6.2.0.6.3.129 (GUI) MMP/2.0');
$this->get('http://localhost/index.php');// RSS 取得
$rss =& new XML_RSS('http://dailynews.yahoo.co.jp/fc/rss.xml');
// RSS パース
$rss->parse();
$i = 0;
foreach ($rss->getItems() as $value) {
if($value['title'] != ""){
$title[$i] = mb_convert_encoding($value['title'], "SJIS", "UTF-8");
$i++;
}
}
for($j=0; $j < $i; $j++){
$this->assertLink($title[$j]);
}
}
}
$test = new BrowserTest();
$test->run(new HtmlReporter('SJIS'));?>
そうすると、大量のE_NOTICEのExceptionが!
Exception: testViewController -> Unexpected PHP error [Only variable references should be returned by reference] severity [E_NOTICE] in [/usr/local/lib/php/simpletest/user_agent.php] line [444]
Exception: testViewController -> Unexpected PHP error [Only variable references should be returned by reference] severity [E_NOTICE] in [/usr/local/lib/php/simpletest/http.php] line [309]
Exception: testViewController -> Unexpected PHP error [Only variable references should be returned by reference] severity [E_NOTICE] in [/usr/local/lib/php/simpletest/http.php] line [520]
Exception: testViewController -> Unexpected PHP error [Only variable references should be returned by reference] severity [E_NOTICE] in [/usr/local/lib/php/simpletest/page.php] line [58]
Exception: testViewController -> Unexpected PHP error [Only variable references should be returned by reference] severity [E_NOTICE] in [/usr/local/lib/php/simpletest/page.php] line [69]
:
(以下略)
:
1/1 test cases complete: 8 passes, 0 fails and 17 exceptions.
テスト自体はpassしてるみたいなんやけど、
SimpleTest側でExceptionが出てるみたい。。。
WEBやSimpleTestのソースを調べると参照渡ししているのに
実体を返していたり、その逆だったりするとでるみたい。。。
まともに対処しようとするとSimpleTestの該当箇所、結構変えなきゃいけなさそうなので
暫定対処でerror_reporting()の箇所を下記のように変更して逃げてみた。。。
error_reporting(E_ALL & ~E_NOTICE)
結構消えて一個だけになった!
Exception: testViewController -> Unexpected PHP error [Only variable references should be returned by reference] severity [E_NOTICE] in [/usr/local/lib/php/simpletest/user_agent.php] line [462]
1/1 test cases complete: 8 passes, 0 fails and 1 exceptions.
該当箇所をみると、やっぱり、参照系のよう。
function &_createRoute($url) {
if ($this->_proxy) {
return new SimpleProxyRoute(
$url,
$this->_proxy,
$this->_proxy_username,
$this->_proxy_password);
}
return new SimpleRoute($url);
}
なので、関数名のところから「&」をとって対処
function _createRoute($url) {
if ($this->_proxy) {
return new SimpleProxyRoute(
$url,
$this->_proxy,
$this->_proxy_username,
$this->_proxy_password);
}
return new SimpleRoute($url);
}
試してみると。。。。
1/1 test cases complete: 8 passes, 0 fails and 0 exceptions.
緑色〜〜〜〜!!!!!
でも、まだまだでてくるんやろな。。。
あぁ、わかった。。。
これって関数ActionClassの内部のローカル変数とかいじってテストするもんじゃないねんや。。。
ActionFormに渡された値によって、
最終的なリターンで返される値とかをチェックするもんの気がしてきた。。。
あとは見た目のチェックも含めてWebTestCaseで補完するのかと思うと納得できたり。。。
ちょっとこの方向で検討してみよう。