pickles/tests/classes/ObjectTest.php
Joshua Sherman 8db383601e 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!
2014-01-12 16:09:48 -05:00

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());
}
}
?>