first test for service factory
This commit is contained in:
parent
36ff61b38e
commit
90f29d6e67
3 changed files with 23 additions and 5 deletions
|
@ -107,6 +107,7 @@ class SemanticScuttle_Service_Factory
|
|||
|
||||
/**
|
||||
* Loads self::$db if it is not loaded already.
|
||||
* Dies if the connection could not be established.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
|
@ -141,7 +142,7 @@ class SemanticScuttle_Service_Factory
|
|||
/**
|
||||
* Returns sql database object
|
||||
*
|
||||
* @return void
|
||||
* @return sql_db Database instance
|
||||
*/
|
||||
public static function getDb()
|
||||
{
|
||||
|
|
13
tests/FactoryTest.php
Normal file
13
tests/FactoryTest.php
Normal file
|
@ -0,0 +1,13 @@
|
|||
<?php
|
||||
|
||||
class FactoryTest extends TestBase
|
||||
{
|
||||
public function testGetDb()
|
||||
{
|
||||
$this->assertInstanceOf(
|
||||
'sql_db',
|
||||
SemanticScuttle_Service_Factory::getDb()
|
||||
);
|
||||
}
|
||||
}
|
||||
?>
|
|
@ -1,8 +1,12 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<phpunit>
|
||||
<phpunit strict="true" colors="true"
|
||||
bootstrap="prepare.php"
|
||||
>
|
||||
<filter>
|
||||
<blacklist>
|
||||
<directory suffix=".php">.</directory>
|
||||
</blacklist>
|
||||
<whitelist addUncoveredFilesFromWhitelist="false">
|
||||
<directory suffix=".php">../src/SemanticScuttle/</directory>
|
||||
<directory suffix=".php">../data/templates/</directory>
|
||||
<directory suffix=".php">../www/</directory>
|
||||
</whitelist>
|
||||
</filter>
|
||||
</phpunit>
|
Loading…
Reference in a new issue