1 | <?php |
||
12 | class MockProviderTest extends TestCase |
||
13 | { |
||
14 | /** |
||
15 | * @var MockProvider |
||
16 | */ |
||
17 | protected $object; |
||
18 | |||
19 | /** |
||
20 | * Sets up the fixture, for example, opens a network connection. |
||
21 | * This method is called before a test is executed. |
||
22 | */ |
||
23 | protected function setUp() |
||
27 | |||
28 | /** |
||
29 | * Tears down the fixture, for example, closes a network connection. |
||
30 | * This method is called after a test is executed. |
||
31 | */ |
||
32 | protected function tearDown() |
||
35 | |||
36 | /** |
||
37 | * @covers Debril\RssAtomBundle\Provider\MockProvider::getFeed |
||
38 | */ |
||
39 | public function testGetContent() |
||
46 | |||
47 | /** |
||
48 | * @covers Debril\RssAtomBundle\Provider\MockProvider::getFeed |
||
49 | * @expectedException \Debril\RssAtomBundle\Exception\FeedException\FeedNotFoundException |
||
50 | */ |
||
51 | public function testGet404() |
||
58 | } |
||
59 |
This check looks for variable assignements that are either overwritten by other assignments or where the variable is not used subsequently.
Both the
$myVar
assignment in line 1 and the$higher
assignment in line 2 are dead. The first because$myVar
is never used and the second because$higher
is always overwritten for every possible time line.