Blame view

libs/XML_Feed_Parser-1.0.2/tests/farsi.php 847 Bytes
42868d70   andryeyev   Создал GIT
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
  <?php
  
  require_once 'XML_Feed_Parser_TestCase.php';
  
  class XML_Feed_Parser_Farsi_TestCase extends XML_Feed_Parser_TestCase
  {
      function __construct($name)
      {
          $this->PHPUnit_TestCase($name);
          $sample_dir = XML_Feed_Parser_TestCase::getSampleDir();
          $this->file = file_get_contents($sample_dir . DIRECTORY_SEPARATOR . 'hoder.xml');
          $this->feed = new XML_Feed_Parser($this->file);
          $this->entry = $this->feed->getEntryByOffset(0);
      }
  
      function test_itemTitleFarsi()
      {
          $value = 'لينکدونی‌ | جلسه‌ی امریکن انترپرایز برای تقسیم قومی ایران';
          $this->assertEquals($value, $this->entry->title);
      }
  }
  
  $suite = new PHPUnit_TestSuite('XML_Feed_Parser_Farsi_TestCase');
  $result = PHPUnit::run($suite, '123');
  echo $result->toString();
  
  ?>