| 1 | <?php |
||
| 14 | |||
| 15 | |||
| 16 | /** ------------------------------------------------------- |
||
| 17 | * Test |
||
| 18 | * |
||
| 19 | */ |
||
| 20 | |||
| 21 | |||
| 22 | private $feed; |
||
| 23 | |||
| 24 | |||
| 25 | public function setUp(){ |
||
| 26 | $rss = new SimplePie(); |
||
| 27 | $rss->get_items(1,1); |
||
| 28 | $this->feed = new CRSSFeed($rss); |
||
| 29 | } |
||
| 30 | |||
| 31 | |||
| 32 | public function testAssertTags(){ |
||
| 33 | $matcher = array( |
||
| 34 | 'tag' => 'h1', 'content' => 'regexp:/<h1>.*<\/h1>/', |
||
| 35 | 'parent' => array('tag' => 'article') |
||
| 36 | ); |
||
| 37 | |||
| 38 | $matchFeed = array( |
||
| 39 | 'tag'=> 'h2', 'content' => 'regexp:/<h2>.*<\/h2>/', |
||
| 40 | 'tag'=> 'small', 'content' => 'regexp:/<small>.*<\/small>/', |
||
| 41 | 'tag'=> 'p', 'content' => 'regexp:/<p>.*<\/p>/', |
||
| 42 | 'parent' => array('tag' => 'div', 'attributes' => array('class' => 'feed-content')) |
||
| 43 | ); |
||
| 44 | } |
||
| 45 | |||
| 46 | |||
| 47 | public function testGetFeed(){ |
||
| 48 | $this->assertInternalType('string', 'regexp:/<article>.*<\/article>/'); |
||
| 49 | } |
||
| 50 | } |