Line | |
---|
1 | <?php |
---|
2 | |
---|
3 | require_once 'XML_Feed_Parser_TestCase.php'; |
---|
4 | |
---|
5 | class XML_Feed_Parser_Farsi_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 . 'hoder.xml'); |
---|
12 | $this->feed = new XML_Feed_Parser($this->file); |
---|
13 | $this->entry = $this->feed->getEntryByOffset(0); |
---|
14 | } |
---|
15 | |
---|
16 | function test_itemTitleFarsi() |
---|
17 | { |
---|
18 | $value = 'لينکدونی | جلسهی امریکن انترپرایز برای تقسیم قومی ایران'; |
---|
19 | $this->assertEquals($value, $this->entry->title); |
---|
20 | } |
---|
21 | } |
---|
22 | |
---|
23 | $suite = new PHPUnit_TestSuite('XML_Feed_Parser_Farsi_TestCase'); |
---|
24 | $result = PHPUnit::run($suite, '123'); |
---|
25 | echo $result->toString(); |
---|
26 | |
---|
27 | ?> |
---|
Note: See
TracBrowser
for help on using the repository browser.