1 | <?php |
---|
2 | |
---|
3 | require_once 'XML_Feed_Parser_TestCase.php'; |
---|
4 | |
---|
5 | class XML_Feed_Parser_Japanese_TestCase extends XML_Feed_Parser_TestCase |
---|
6 | { |
---|
7 | function __construct($name) |
---|
8 | { |
---|
9 | $this->PHPUnit_TestCase($name); |
---|
10 | $sample_dir = XML_Feed_Parser_TestCase::getSampleDir(); |
---|
11 | $this->file = file_get_contents($sample_dir . DIRECTORY_SEPARATOR . "sixapart-jp.xml"); |
---|
12 | $this->feed = new XML_Feed_Parser($this->file); |
---|
13 | $this->entry = $this->feed->getEntryByOffset(0); |
---|
14 | } |
---|
15 | |
---|
16 | function test_itemTitleJapanese() |
---|
17 | { |
---|
18 | $value = "ファイブ・ディーが、Movable Typeでブログプロモーションをスタート"; |
---|
19 | $this->assertEquals($value, $this->entry->title); |
---|
20 | } |
---|
21 | |
---|
22 | function test_itemDescriptionJapanese() |
---|
23 | { |
---|
24 | $value = "<p><img alt=\"MIYAZAWAblog_banner.jpg\" src=\"http://www.sixapart.jp/MIYAZAWAblog_banner.jpg\" width=\"200\" height=\"88\" align=\"right\" /><br /> |
---|
25 | ファイブ・ディーは、Movable Typeで構築したプロモーション ブログ『宮沢和史 中南米ツアーblog Latin America 2005』を開設しました。</p> |
---|
26 | |
---|
27 | <p>9月21日に開設されたこのブログは、ブラジル、ホンジュラス、ニカラグア、メキシコ、キューバの5か国を巡る「Latin America 2005」ツアーに合わせ、そのツアーの模様を同行マネージャーがレポートしていきます。<br /> |
---|
28 | さらに今月2日からは宮沢和史自身が日々録音した声をPodcastingするという点でも、ブログを使ったユニークなプロモーションとなっています。</p> |
---|
29 | |
---|
30 | <p><a href=\"http://www.five-d.co.jp/miyazawa/jp/blog/la2005/\">「宮沢和史 中南米ツアーblog Latin America 2005」</a></p> |
---|
31 | |
---|
32 | <p>※シックス・アパートではこうしたブログを使ったプロモーションに最適な製品をご用意しております。<br /> |
---|
33 | <ul><li><a href=\"/movabletype/\">Movable Type</a><br /> |
---|
34 | <li><a href=\"/typepad/typepad_promotion.html\">TypePad Promotion</a><br /> |
---|
35 | </ul></p>"; |
---|
36 | $this->assertEquals($value, $this->entry->description); |
---|
37 | } |
---|
38 | } |
---|
39 | |
---|
40 | $suite = new PHPUnit_TestSuite("XML_Feed_Parser_Japanese_TestCase"); |
---|
41 | $result = PHPUnit::run($suite, "123"); |
---|
42 | echo $result->toString(); |
---|
43 | |
---|
44 | ?> |
---|