function Comment Missing
This commit is contained in:
parent
e47059fa36
commit
b015d05f07
@ -163,6 +163,12 @@ function fichinter_admin_prepare_head()
|
||||
return $head;
|
||||
}
|
||||
|
||||
/**
|
||||
* Prepare array with list of tabs
|
||||
*
|
||||
* @param Object $object Object related to tabs
|
||||
* @return array Array of tabs to show
|
||||
*/
|
||||
function fichinter_rec_prepare_head($object)
|
||||
{
|
||||
global $langs, $conf; //, $user;
|
||||
|
||||
@ -74,14 +74,24 @@ class BonPrelevementTest extends PHPUnit_Framework_TestCase
|
||||
print "\n";
|
||||
}
|
||||
|
||||
// Static methods
|
||||
public static function setUpBeforeClass()
|
||||
/**
|
||||
* setUpBeforeClass
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public static function setUpBeforeClass()
|
||||
{
|
||||
global $conf,$user,$langs,$db;
|
||||
$db->begin(); // This is to have all actions inside a transaction even if test launched without suite.
|
||||
|
||||
print __METHOD__."\n";
|
||||
}
|
||||
|
||||
/**
|
||||
* tearDownAfterClass
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public static function tearDownAfterClass()
|
||||
{
|
||||
global $conf,$user,$langs,$db;
|
||||
|
||||
@ -42,6 +42,11 @@ class InstallTest extends PHPUnit_Extensions_Selenium2TestCase
|
||||
)
|
||||
);
|
||||
|
||||
/**
|
||||
* setUpBeforeClass
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public static function setUpBeforeClass()
|
||||
{
|
||||
// Make sure we backup and remove the configuration file to force new install.
|
||||
@ -54,12 +59,22 @@ class InstallTest extends PHPUnit_Extensions_Selenium2TestCase
|
||||
self::shareSession(true);
|
||||
}
|
||||
|
||||
/**
|
||||
* dropTestDatabase
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected static function dropTestDatabase()
|
||||
{
|
||||
$mysqli = new mysqli(self::$db_host, self::$db_admin_user, self::$db_admin_pass);
|
||||
$mysqli->query("DROP DATABASE " . self::$db_name);
|
||||
}
|
||||
|
||||
/**
|
||||
* tearDownAfterClass
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public static function tearDownAfterClass()
|
||||
{
|
||||
// Remove the generated configuration and restore the backed up file.
|
||||
@ -70,6 +85,11 @@ class InstallTest extends PHPUnit_Extensions_Selenium2TestCase
|
||||
self::dropTestDatabase();
|
||||
}
|
||||
|
||||
/**
|
||||
* setUp
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function setUp()
|
||||
{
|
||||
// Populating the database can take quite long.
|
||||
@ -77,17 +97,32 @@ class InstallTest extends PHPUnit_Extensions_Selenium2TestCase
|
||||
$this->setBrowserUrl(self::$url);
|
||||
}
|
||||
|
||||
/**
|
||||
* testInstallRedirect
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function testInstallRedirect()
|
||||
{
|
||||
$this->url('/');
|
||||
$this->assertContains('/install/index.php', $this->url());
|
||||
}
|
||||
|
||||
/**
|
||||
* testInstallPageTitle
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function testInstallPageTitle()
|
||||
{
|
||||
$this->assertContains('Dolibarr', $this->title());
|
||||
}
|
||||
|
||||
/**
|
||||
* testInstallProcess
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function testInstallProcess()
|
||||
{
|
||||
// FIXME: the button itself should have an ID
|
||||
@ -95,6 +130,11 @@ class InstallTest extends PHPUnit_Extensions_Selenium2TestCase
|
||||
$this->assertContains('/install/check.php', $this->url());
|
||||
}
|
||||
|
||||
/**
|
||||
* testCheckPage
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function testCheckPage()
|
||||
{
|
||||
$unavailable_choices = $this->byId('navail_choices');
|
||||
@ -109,6 +149,11 @@ class InstallTest extends PHPUnit_Extensions_Selenium2TestCase
|
||||
$this->assertContains('/install/fileconf.php', $this->url());
|
||||
}
|
||||
|
||||
/**
|
||||
* testForm
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function testForm()
|
||||
{
|
||||
$this->assertFalse($this->byClassName('hideroot')->displayed());
|
||||
@ -153,12 +198,22 @@ class InstallTest extends PHPUnit_Extensions_Selenium2TestCase
|
||||
$this->byId('db_pass_root')->value('');
|
||||
}
|
||||
|
||||
/**
|
||||
* testFormSubmit
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function testFormSubmit()
|
||||
{
|
||||
$this->byName('forminstall')->submit();
|
||||
$this->assertContains('/install/step1.php', $this->url());
|
||||
}
|
||||
|
||||
/**
|
||||
* testStep1
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function testStep1()
|
||||
{
|
||||
$this->assertFalse($this->byId('pleasewait')->displayed());
|
||||
@ -170,6 +225,11 @@ class InstallTest extends PHPUnit_Extensions_Selenium2TestCase
|
||||
$this->assertContains('/install/step2.php', $this->url());
|
||||
}
|
||||
|
||||
/**
|
||||
* testStep2
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function testStep2()
|
||||
{
|
||||
$this->byName('forminstall')->submit();
|
||||
@ -178,6 +238,11 @@ class InstallTest extends PHPUnit_Extensions_Selenium2TestCase
|
||||
|
||||
// There is no step 3
|
||||
|
||||
/**
|
||||
* testStep4
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function testStep4()
|
||||
{
|
||||
// FIXME: should have an ID
|
||||
@ -191,6 +256,11 @@ class InstallTest extends PHPUnit_Extensions_Selenium2TestCase
|
||||
$this->assertContains('/install/step5.php', $this->url());
|
||||
}
|
||||
|
||||
/**
|
||||
* testStep5
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function testStep5()
|
||||
{
|
||||
// FIXME: this button should have an ID
|
||||
@ -198,6 +268,11 @@ class InstallTest extends PHPUnit_Extensions_Selenium2TestCase
|
||||
$this->assertContains('/admin/index.php', $this->url());
|
||||
}
|
||||
|
||||
/**
|
||||
* testFirstLogin
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function testFirstLogin()
|
||||
{
|
||||
$this->assertEquals('login', $this->byTag('form')->attribute('id'));
|
||||
|
||||
Loading…
Reference in New Issue
Block a user