Code Coverage |
||||||||||
Classes and Traits |
Functions and Methods |
Lines |
||||||||
Total | n/a |
0 / 0 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
|||
SharedTest | n/a |
0 / 0 |
|
100.00% |
11 / 11 |
11 | n/a |
0 / 0 |
||
setUp | |
100.00% |
1 / 1 |
1 | n/a |
0 / 0 |
||||
tearDown | |
100.00% |
1 / 1 |
1 | n/a |
0 / 0 |
||||
testSingleton | |
100.00% |
1 / 1 |
1 | n/a |
0 / 0 |
||||
testInstanced | |
100.00% |
1 / 1 |
1 | n/a |
0 / 0 |
||||
testSetConfigValue | |
100.00% |
1 / 1 |
1 | n/a |
0 / 0 |
||||
testDb | |
100.00% |
1 / 1 |
1 | n/a |
0 / 0 |
||||
testLogger | |
100.00% |
1 / 1 |
1 | n/a |
0 / 0 |
||||
testWebPage | |
100.00% |
1 / 1 |
1 | n/a |
0 / 0 |
||||
testUser | |
100.00% |
1 / 1 |
1 | n/a |
0 / 0 |
||||
testIsCli | |
100.00% |
1 / 1 |
1 | n/a |
0 / 0 |
||||
testRegisterItem | |
100.00% |
1 / 1 |
1 | n/a |
0 / 0 |
<?php | |
namespace Test\Ease; | |
use Ease\Shared; | |
/** | |
* Generated by PHPUnit_SkeletonGenerator on 2016-01-17 at 23:58:11. | |
*/ | |
class SharedTest extends AtomTest | |
{ | |
/** | |
* @var Shared | |
*/ | |
protected $object; | |
/** | |
* Sets up the fixture, for example, opens a network connection. | |
* This method is called before a test is executed. | |
*/ | |
protected function setUp() | |
{ | |
$this->object = \Ease\Shared::instanced(); | |
} | |
/** | |
* Tears down the fixture, for example, closes a network connection. | |
* This method is called after a test is executed. | |
*/ | |
protected function tearDown() | |
{ | |
} | |
/** | |
* @covers Ease\Shared::singleton | |
*/ | |
public function testSingleton() | |
{ | |
$this->assertInstanceOf('\Ease\Shared', \Ease\Shared::singleton()); | |
} | |
/** | |
* @covers Ease\Shared::instanced | |
*/ | |
public function testInstanced() | |
{ | |
$this->assertInstanceOf('\Ease\Shared', \Ease\Shared::instanced()); | |
} | |
/** | |
* @covers Ease\Shared::setConfigValue | |
* @covers Ease\Shared::getConfigValue | |
*/ | |
public function testSetConfigValue() | |
{ | |
$this->object->setConfigValue('test', true); | |
$this->assertTrue($this->object->getConfigValue('test')); | |
} | |
/** | |
* @covers Ease\Shared::db | |
*/ | |
public function testDb() | |
{ | |
$this->assertInstanceOf('\Ease\SQL\PDO', \Ease\Shared::db()); | |
} | |
/** | |
* @covers Ease\Shared::logger | |
*/ | |
public function testLogger() | |
{ | |
$this->assertInstanceOf('\Ease\Logger\Regent', \Ease\Shared::logger()); | |
} | |
/** | |
* @covers Ease\Shared::webPage | |
*/ | |
public function testWebPage() | |
{ | |
$this->assertInstanceOf('\Ease\WebPage', \Ease\Shared::webPage()); | |
} | |
/** | |
* @covers Ease\Shared::user | |
*/ | |
public function testUser() | |
{ | |
$this->assertInstanceOf('\Ease\Anonym', \Ease\Shared::user()); | |
$this->assertInstanceOf('\Ease\User', | |
\Ease\Shared::user(new \Ease\User())); | |
$this->assertInstanceOf('\Ease\User', \Ease\Shared::user()); | |
} | |
/** | |
* @covers Ease\Shared::isCli | |
*/ | |
public function testIsCli() | |
{ | |
$this->assertTrue($this->object->isCli()); | |
} | |
/** | |
* @covers Ease\Shared::registerItem | |
*/ | |
public function testRegisterItem() | |
{ | |
$item = new \Ease\Html\ATag('#'); | |
\Ease\Shared::registerItem($item); | |
$this->assertInstanceOf(get_class($item), end($this->object->allItems)); | |
} | |
} |