More tests and 100% coverage achievements!
Also fixed a few minor bugs and reworked Browser class to not use the constant UNIT_TESTING so I could get the class to 100% coverage. Adds a dependency of testing_helpers which I believe is available on Travis CI by default. Up to 75% coverage, w00t w00t!
This commit is contained in:
parent
faaefc1b82
commit
8db383601e
15 changed files with 136 additions and 62 deletions
|
@ -22,7 +22,7 @@
|
|||
*/
|
||||
class HTML extends Object
|
||||
{
|
||||
private $self_closing = array('br', 'hr', 'img', 'input', 'link', 'meta');
|
||||
private $self_closing = ['br', 'hr', 'img', 'input', 'link', 'meta'];
|
||||
|
||||
public function __call($method, $arguments)
|
||||
{
|
||||
|
@ -58,7 +58,7 @@ class HTML extends Object
|
|||
}
|
||||
else
|
||||
{
|
||||
$attributes = array('type' => $type);
|
||||
$attributes = ['type' => $type];
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -66,14 +66,15 @@ class HTML extends Object
|
|||
{
|
||||
if (isset($attributes['name']))
|
||||
{
|
||||
$label = $this->label(array('for' => $attributes['name']), $attributes['label']);
|
||||
unset($attributes['label']);
|
||||
$label = $this->label(['for' => $attributes['name']], $attributes['label']);
|
||||
}
|
||||
else
|
||||
{
|
||||
$label = $this->label($attributes['label']);
|
||||
}
|
||||
|
||||
unset($attributes['label']);
|
||||
|
||||
return $label . $this->$method($attributes, $contents);
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue