Completed
Push — master ( 825cf1...ca9c6c )
by Mia
06:41
created

CRSSFeedTest::setUp()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 5
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 4
nc 1
nop 0
1
<?php
2
/**
3
 * A test class for testing RSSFeed class
4
 * 
5
 */
6
7
namespace Miax\RSSFeed;
8
use SimplePie;
9
use Miax\RSSFeed\CRSSFeed;
10
require_once(__DIR__."/../../src/RSSFeed/simplepie/simplepie_1.3.1.mini.php");
11
12
      
13
class CRSSFeedTest extends \PHPUnit_Framework_TestCase {
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
}