Completed
Push — master ( 7d3f1b...723e15 )
by Mia
03:14
created

CRSSFeedTest::testGetFeed()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 5
rs 9.4285
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
10
//change the cache directory to wherever you want it
11
//define('CACHE', __DIR__.'/../webroot/cache/');
12
13
//require_once(__DIR__.'/../simplepie/simplepie_1.3.1.mini.php');
0 ignored issues
show
Unused Code Comprehensibility introduced by
80% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
14
//require_once(__DIR__.'/../CRSSFeed.php');
15
16
class CRSSFeedTest extends \PHPUnit_Framework_TestCase {
17
   
18
   private $feed;
19
   
20
   /*public function setUp(){
0 ignored issues
show
Unused Code Comprehensibility introduced by
58% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
21
	   $this->feed = new \Miax\RSSFeed\CRSSFeed(['http://feeds.feedburner.com/idg/vzzs']);
22
	   $test = get_items($this->feed);
23
	   $exp = "\Miax\RSSFeed\CRSSFeed";
24
	   $this->assertEquals($test, $exp, "Wrong items");
25
   }*/
26
   
27
  /**
28
     * Test 
29
     *
30
     * @return void
31
     *
32
     */
33
  public function testGetFeed() {
34
    $this->feed = new \Miax\RSSFeed\CRSSFeed(['http://feeds.feedburner.com/idg/vzzs']);
35
	   $content = $this->feed->getFeed();
36
	   $this->assertInternalType('string', $content, "Return type is not a string");
37
  } 
38
}