Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
XDebug issue with code coverage; PHP 5.4.25, XDebug 2.2.3, PHPUnit 3.7.31
<?php
require_once 'Model.php';
class BraceTest extends PHPUnit_Framework_TestCase {
public function testBraces()
{
$params = array(1, 2, 3);
Model::load_something($params);
}
}
<?php
class Model {
public static function load_something($params)
{
foreach ( $params as $param )
{
$get_something = Model::get_something($param);
if ( $get_something )
{
if ( $get_something['time'] == $param )
{
$set_something = 'something';
break;
}
} // this line is ignored
}
return $set_something;
}
public static function get_something($param)
{
return array(
'time' => $param
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.