Passage en Namespace et tous les tests fonctionnels OK
This commit is contained in:
@@ -7,8 +7,10 @@
|
||||
|
||||
namespace Domframework\Tests;
|
||||
|
||||
/** Test the config.php file */
|
||||
class configTest extends \PHPUnit_Framework_TestCase
|
||||
use Domframework\Config;
|
||||
|
||||
/** Test the Config.php file */
|
||||
class ConfigTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
|
||||
public function test_ExternFile ()
|
||||
@@ -19,14 +21,14 @@ class configTest extends \PHPUnit_Framework_TestCase
|
||||
|
||||
public function test_params1 ()
|
||||
{
|
||||
$c = new config ();
|
||||
$c = new Config ();
|
||||
$res = $c->params ();
|
||||
$this->assertSame (array (), $res);
|
||||
}
|
||||
|
||||
public function testGet1 ()
|
||||
{
|
||||
$c = new config ();
|
||||
$c = new Config ();
|
||||
$c->confFile = "/tmp/testconf.php";
|
||||
$c->default = array (
|
||||
"database"=>array (
|
||||
@@ -46,7 +48,7 @@ class configTest extends \PHPUnit_Framework_TestCase
|
||||
|
||||
public function testSet1 ()
|
||||
{
|
||||
$c = new config ();
|
||||
$c = new Config ();
|
||||
$c->confFile = "/tmp/testconf.php";
|
||||
$c->default = array (
|
||||
"database"=>array (
|
||||
@@ -58,7 +60,7 @@ class configTest extends \PHPUnit_Framework_TestCase
|
||||
|
||||
public function testGet2 ()
|
||||
{
|
||||
$c = new config ();
|
||||
$c = new Config ();
|
||||
$c->confFile = "/tmp/testconf.php";
|
||||
$c->default = array (
|
||||
"database"=>array (
|
||||
@@ -73,7 +75,7 @@ class configTest extends \PHPUnit_Framework_TestCase
|
||||
/** Can't create file */
|
||||
public function testGet3 ()
|
||||
{
|
||||
$c = new config ();
|
||||
$c = new Config ();
|
||||
$c->confFile = "/tmp/1/2.3/dd/testconf.php";
|
||||
$c->default = array (
|
||||
"database"=>array (
|
||||
@@ -86,7 +88,7 @@ class configTest extends \PHPUnit_Framework_TestCase
|
||||
/** Can't read the file */
|
||||
public function testGet4 ()
|
||||
{
|
||||
$c = new config ();
|
||||
$c = new Config ();
|
||||
$c->confFile = "/tmp/testconf.php";
|
||||
chmod ("/tmp/testconf.php", 0222);
|
||||
$c->default = array (
|
||||
@@ -100,7 +102,7 @@ class configTest extends \PHPUnit_Framework_TestCase
|
||||
/** File non exists and can not be created */
|
||||
public function testSet2 ()
|
||||
{
|
||||
$c = new config ();
|
||||
$c = new Config ();
|
||||
$c->confFile = "/tmp/1/2.3/dd/testconf.php";
|
||||
$c->default = array (
|
||||
"database"=>array (
|
||||
@@ -113,7 +115,7 @@ class configTest extends \PHPUnit_Framework_TestCase
|
||||
/** Can't read the file */
|
||||
public function testSet3 ()
|
||||
{
|
||||
$c = new config ();
|
||||
$c = new Config ();
|
||||
$c->confFile = "/tmp/testconf.php";
|
||||
chmod ("/tmp/testconf.php", 0222);
|
||||
$c->default = array (
|
||||
@@ -127,7 +129,7 @@ class configTest extends \PHPUnit_Framework_TestCase
|
||||
/** Can't write the file */
|
||||
public function testSet4 ()
|
||||
{
|
||||
$c = new config ();
|
||||
$c = new Config ();
|
||||
$c->confFile = "/tmp/testconf.php";
|
||||
chmod ("/tmp/testconf.php", 0444);
|
||||
$c->default = array (
|
||||
@@ -141,7 +143,7 @@ class configTest extends \PHPUnit_Framework_TestCase
|
||||
/** Save TRUE/FALSE/NULL/String values */
|
||||
public function testSet5 ()
|
||||
{
|
||||
$c = new config ();
|
||||
$c = new Config ();
|
||||
$c->confFile = "/tmp/testconf.php";
|
||||
chmod ("/tmp/testconf.php", 0666);
|
||||
$c->default = array (
|
||||
@@ -158,7 +160,7 @@ class configTest extends \PHPUnit_Framework_TestCase
|
||||
|
||||
public function testGet6 ()
|
||||
{
|
||||
$c = new config ();
|
||||
$c = new Config ();
|
||||
$c->confFile = "/tmp/testconf.php";
|
||||
chmod ("/tmp/testconf.php", 0666);
|
||||
$c->default = array (
|
||||
@@ -183,7 +185,7 @@ class configTest extends \PHPUnit_Framework_TestCase
|
||||
|
||||
public function testSet7 ()
|
||||
{
|
||||
$c = new config ();
|
||||
$c = new Config ();
|
||||
$c->confFile = "/tmp/testconf.php";
|
||||
chmod ("/tmp/testconf.php", 0666);
|
||||
$c->default = array (
|
||||
@@ -207,7 +209,7 @@ class configTest extends \PHPUnit_Framework_TestCase
|
||||
}
|
||||
public function testGet7 ()
|
||||
{
|
||||
$c = new config ();
|
||||
$c = new Config ();
|
||||
$c->confFile = "/tmp/testconf.php";
|
||||
chmod ("/tmp/testconf.php", 0666);
|
||||
$c->default = array (
|
||||
@@ -233,7 +235,7 @@ class configTest extends \PHPUnit_Framework_TestCase
|
||||
|
||||
public function testGet8 ()
|
||||
{
|
||||
$c = new config ();
|
||||
$c = new Config ();
|
||||
$c->confFile = "/tmp/testconf.php";
|
||||
chmod ("/tmp/testconf.php", 0666);
|
||||
$c->default = array (
|
||||
|
||||
Reference in New Issue
Block a user