2
0
forked from Wavyzz/dolibarr

code syntax

This commit is contained in:
Frédéric FRANCE
2021-01-14 15:09:08 +01:00
parent 43161be711
commit b1a1cd4be6
83 changed files with 14010 additions and 13774 deletions

View File

@@ -42,11 +42,11 @@ class InstallTest extends PHPUnit_Extensions_Selenium2TestCase
)
);
/**
* setUpBeforeClass
*
* @return void
*/
/**
* setUpBeforeClass
*
* @return void
*/
public static function setUpBeforeClass()
{
// Make sure we backup and remove the configuration file to force new install.
@@ -59,22 +59,22 @@ class InstallTest extends PHPUnit_Extensions_Selenium2TestCase
self::shareSession(true);
}
/**
* dropTestDatabase
*
* @return void
*/
/**
* 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
*/
/**
* tearDownAfterClass
*
* @return void
*/
public static function tearDownAfterClass()
{
// Remove the generated configuration and restore the backed up file.
@@ -85,11 +85,11 @@ class InstallTest extends PHPUnit_Extensions_Selenium2TestCase
self::dropTestDatabase();
}
/**
* setUp
*
* @return void
*/
/**
* setUp
*
* @return void
*/
public function setUp()
{
// Populating the database can take quite long.
@@ -97,32 +97,32 @@ class InstallTest extends PHPUnit_Extensions_Selenium2TestCase
$this->setBrowserUrl(self::$url);
}
/**
* testInstallRedirect
*
* @return void
*/
/**
* testInstallRedirect
*
* @return void
*/
public function testInstallRedirect()
{
$this->url('/');
$this->assertContains('/install/index.php', $this->url());
}
/**
* testInstallPageTitle
*
* @return void
*/
/**
* testInstallPageTitle
*
* @return void
*/
public function testInstallPageTitle()
{
$this->assertContains('Dolibarr', $this->title());
}
/**
* testInstallProcess
*
* @return void
*/
/**
* testInstallProcess
*
* @return void
*/
public function testInstallProcess()
{
// FIXME: the button itself should have an ID
@@ -130,11 +130,11 @@ class InstallTest extends PHPUnit_Extensions_Selenium2TestCase
$this->assertContains('/install/check.php', $this->url());
}
/**
* testCheckPage
*
* @return void
*/
/**
* testCheckPage
*
* @return void
*/
public function testCheckPage()
{
$unavailable_choices = $this->byId('navail_choices');
@@ -149,11 +149,11 @@ class InstallTest extends PHPUnit_Extensions_Selenium2TestCase
$this->assertContains('/install/fileconf.php', $this->url());
}
/**
* testForm
*
* @return void
*/
/**
* testForm
*
* @return void
*/
public function testForm()
{
$this->assertFalse($this->byClassName('hideroot')->displayed());
@@ -198,22 +198,22 @@ class InstallTest extends PHPUnit_Extensions_Selenium2TestCase
$this->byId('db_pass_root')->value('');
}
/**
* testFormSubmit
*
* @return void
*/
/**
* testFormSubmit
*
* @return void
*/
public function testFormSubmit()
{
$this->byName('forminstall')->submit();
$this->assertContains('/install/step1.php', $this->url());
}
/**
* testStep1
*
* @return void
*/
/**
* testStep1
*
* @return void
*/
public function testStep1()
{
$this->assertFalse($this->byId('pleasewait')->displayed());
@@ -225,11 +225,11 @@ class InstallTest extends PHPUnit_Extensions_Selenium2TestCase
$this->assertContains('/install/step2.php', $this->url());
}
/**
* testStep2
*
* @return void
*/
/**
* testStep2
*
* @return void
*/
public function testStep2()
{
$this->byName('forminstall')->submit();
@@ -238,11 +238,11 @@ class InstallTest extends PHPUnit_Extensions_Selenium2TestCase
// There is no step 3
/**
* testStep4
*
* @return void
*/
/**
* testStep4
*
* @return void
*/
public function testStep4()
{
// FIXME: should have an ID
@@ -256,11 +256,11 @@ class InstallTest extends PHPUnit_Extensions_Selenium2TestCase
$this->assertContains('/install/step5.php', $this->url());
}
/**
* testStep5
*
* @return void
*/
/**
* testStep5
*
* @return void
*/
public function testStep5()
{
// FIXME: this button should have an ID
@@ -268,11 +268,11 @@ class InstallTest extends PHPUnit_Extensions_Selenium2TestCase
$this->assertContains('/admin/index.php', $this->url());
}
/**
* testFirstLogin
*
* @return void
*/
/**
* testFirstLogin
*
* @return void
*/
public function testFirstLogin()
{
$this->assertEquals('login', $this->byTag('form')->attribute('id'));