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!
25 lines
527 B
PHP
25 lines
527 B
PHP
<?php
|
|
|
|
class ObjectTest extends PHPUnit_Framework_TestCase
|
|
{
|
|
public function testConstructorWithoutObjects()
|
|
{
|
|
$object = new Object();
|
|
|
|
$this->assertInstanceOf('Config', PHPUnit_Framework_Assert::readAttribute($object, 'config'));
|
|
}
|
|
|
|
public function testConstructorWithObjects()
|
|
{
|
|
$object = new Object('cache');
|
|
|
|
$this->assertInstanceOf('Cache', PHPUnit_Framework_Assert::readAttribute($object, 'cache'));
|
|
}
|
|
|
|
public function testGetInstanceWithoutClass()
|
|
{
|
|
$this->assertFalse(Object::getInstance());
|
|
}
|
|
}
|
|
|
|
?>
|