Line 1... |
Line 1... |
1 |
<?php
|
1 |
<?php
|
2 |
require_once dirname(__FILE__).'/../EfloreScriptPhpUnitTestCase.php';
|
2 |
require_once dirname(__FILE__).'/../ScriptEflorePhpUnit.php';
|
Line 3... |
Line 3... |
3 |
|
3 |
|
Line 4... |
Line 4... |
4 |
class EfloreScriptTest extends EfloreScriptPhpUnitTestCase {
|
4 |
class EfloreScriptTest extends ScriptEflorePhpUnit {
|
- |
|
5 |
|
5 |
|
6 |
public function testChargerConfigDuProjetAvecFichiersIni() {
|
6 |
public function testChargerConfigDuProjetAvecFichiersIni() {
|
7 |
$cheminRacine = realpath(dirname(__FILE__).'/../tmp/').'/';
|
7 |
if (!file_exists('tmp/test.defaut.ini')) {
|
8 |
if (!file_exists($cheminRacine.'test.defaut.ini')) {
|
8 |
file_put_contents('tmp/test.defaut.ini', '');
|
9 |
file_put_contents($cheminRacine.'test.defaut.ini', '');
|
9 |
}
|
10 |
}
|
10 |
if (!file_exists('tmp/test.ini')) {
|
11 |
if (!file_exists($cheminRacine.'test.ini')) {
|
Line 11... |
Line 12... |
11 |
file_put_contents('tmp/test.ini', "[tables]\ntest=OK");
|
12 |
file_put_contents($cheminRacine.'test.ini', "[tables]\ntest=OK");
|
12 |
}
|
13 |
}
|
13 |
|
14 |
|
14 |
$script = $this->getMock('EfloreScript', array('getScriptChemin', 'getProjetNom', 'executer'));
|
15 |
$script = $this->getMock('EfloreScript', array('getScriptChemin', 'getProjetNom', 'executer'));
|
15 |
$script->expects($this->any())->method('getScriptChemin')->will($this->returnValue('tmp/'));
|
16 |
$script->expects($this->any())->method('getScriptChemin')->will($this->returnValue($cheminRacine));
|
Line 16... |
Line 17... |
16 |
$script->expects($this->any())->method('getProjetNom')->will($this->returnValue('test'));
|
17 |
$script->expects($this->any())->method('getProjetNom')->will($this->returnValue('test'));
|