mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-07 18:18:18 +01:00
Reindent module template
This commit is contained in:
@@ -69,14 +69,14 @@ class MyModuleFunctionalTest extends \PHPUnit_Extensions_Selenium2TestCase
|
||||
),
|
||||
// Geckodriver does not keep the session at the moment?!
|
||||
// XPath selectors also don't seem to work
|
||||
//array(
|
||||
// 'browser' => 'Mozilla Firefox on Linux',
|
||||
// 'browserName' => 'firefox',
|
||||
// 'sessionStrategy' => 'shared',
|
||||
// 'desiredCapabilities' => array(
|
||||
// 'marionette' => true,
|
||||
// ),
|
||||
//)
|
||||
//array(
|
||||
// 'browser' => 'Mozilla Firefox on Linux',
|
||||
// 'browserName' => 'firefox',
|
||||
// 'sessionStrategy' => 'shared',
|
||||
// 'desiredCapabilities' => array(
|
||||
// 'marionette' => true,
|
||||
// ),
|
||||
//)
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -99,7 +99,7 @@ class MyModuleFunctionalTest extends \PHPUnit_Extensions_Selenium2TestCase
|
||||
|
||||
/**
|
||||
* Global test setup
|
||||
* @return void
|
||||
* @return void
|
||||
*/
|
||||
public static function setUpBeforeClass()
|
||||
{
|
||||
@@ -107,7 +107,7 @@ class MyModuleFunctionalTest extends \PHPUnit_Extensions_Selenium2TestCase
|
||||
|
||||
/**
|
||||
* Unit test setup
|
||||
* @return void
|
||||
* @return void
|
||||
*/
|
||||
public function setUp()
|
||||
{
|
||||
@@ -117,7 +117,7 @@ class MyModuleFunctionalTest extends \PHPUnit_Extensions_Selenium2TestCase
|
||||
|
||||
/**
|
||||
* Verify pre conditions
|
||||
* @return void
|
||||
* @return void
|
||||
*/
|
||||
protected function assertPreConditions()
|
||||
{
|
||||
@@ -125,7 +125,7 @@ class MyModuleFunctionalTest extends \PHPUnit_Extensions_Selenium2TestCase
|
||||
|
||||
/**
|
||||
* Handle Dolibarr authentication
|
||||
* @return void
|
||||
* @return void
|
||||
*/
|
||||
private function authenticate()
|
||||
{
|
||||
@@ -146,7 +146,7 @@ class MyModuleFunctionalTest extends \PHPUnit_Extensions_Selenium2TestCase
|
||||
|
||||
/**
|
||||
* Test enabling developer mode
|
||||
* @return bool
|
||||
* @return bool
|
||||
*/
|
||||
public function testEnableDeveloperMode()
|
||||
{
|
||||
@@ -166,7 +166,7 @@ class MyModuleFunctionalTest extends \PHPUnit_Extensions_Selenium2TestCase
|
||||
* Test enabling the module
|
||||
*
|
||||
* @depends testEnableDeveloperMode
|
||||
* @return bool
|
||||
* @return bool
|
||||
*/
|
||||
public function testModuleEnabled()
|
||||
{
|
||||
@@ -192,7 +192,7 @@ class MyModuleFunctionalTest extends \PHPUnit_Extensions_Selenium2TestCase
|
||||
* Test access to the configuration page
|
||||
*
|
||||
* @depends testModuleEnabled
|
||||
* @return bool
|
||||
* @return bool
|
||||
*/
|
||||
public function testConfigurationPage()
|
||||
{
|
||||
@@ -205,7 +205,7 @@ class MyModuleFunctionalTest extends \PHPUnit_Extensions_Selenium2TestCase
|
||||
* Test access to the about page
|
||||
*
|
||||
* @depends testConfigurationPage
|
||||
* @return bool
|
||||
* @return bool
|
||||
*/
|
||||
public function testAboutPage()
|
||||
{
|
||||
@@ -218,13 +218,13 @@ class MyModuleFunctionalTest extends \PHPUnit_Extensions_Selenium2TestCase
|
||||
* Test about page is rendering Markdown
|
||||
*
|
||||
* @depends testAboutPage
|
||||
* @return bool
|
||||
* @return bool
|
||||
*/
|
||||
public function testAboutPageRendersMarkdownReadme()
|
||||
{
|
||||
$this->url('/custom/mymodule/admin/about.php');
|
||||
$this->authenticate();
|
||||
return $this->assertEquals(
|
||||
return $this->assertEquals(
|
||||
'Dolibarr Module Template (aka My Module)',
|
||||
$this->byTag('h1')->text(),
|
||||
"Readme title"
|
||||
@@ -235,7 +235,7 @@ class MyModuleFunctionalTest extends \PHPUnit_Extensions_Selenium2TestCase
|
||||
* Test box is properly declared
|
||||
*
|
||||
* @depends testModuleEnabled
|
||||
* @return bool
|
||||
* @return bool
|
||||
*/
|
||||
public function testBoxDeclared()
|
||||
{
|
||||
@@ -248,13 +248,13 @@ class MyModuleFunctionalTest extends \PHPUnit_Extensions_Selenium2TestCase
|
||||
* Test trigger is properly enabled
|
||||
*
|
||||
* @depends testModuleEnabled
|
||||
* @return bool
|
||||
* @return bool
|
||||
*/
|
||||
public function testTriggerDeclared()
|
||||
{
|
||||
$this->url('/admin/triggers.php');
|
||||
$this->authenticate();
|
||||
return $this->assertContains(
|
||||
return $this->assertContains(
|
||||
'interface_99_modMyModule_MyModuleTriggers.class.php',
|
||||
$this->byTag('body')->text(),
|
||||
"Trigger declared"
|
||||
@@ -265,13 +265,13 @@ class MyModuleFunctionalTest extends \PHPUnit_Extensions_Selenium2TestCase
|
||||
* Test trigger is properly declared
|
||||
*
|
||||
* @depends testTriggerDeclared
|
||||
* @return bool
|
||||
* @return bool
|
||||
*/
|
||||
public function testTriggerEnabled()
|
||||
{
|
||||
$this->url('/admin/triggers.php');
|
||||
$this->authenticate();
|
||||
return $this->assertContains(
|
||||
return $this->assertContains(
|
||||
'tick.png',
|
||||
$this->byXPath('//td[text()="interface_99_modMyModule_MyTrigger.class.php"]/following::img')->attribute('src'),
|
||||
"Trigger enabled"
|
||||
@@ -280,7 +280,7 @@ class MyModuleFunctionalTest extends \PHPUnit_Extensions_Selenium2TestCase
|
||||
|
||||
/**
|
||||
* Verify post conditions
|
||||
* @return void
|
||||
* @return void
|
||||
*/
|
||||
protected function assertPostConditions()
|
||||
{
|
||||
@@ -288,7 +288,7 @@ class MyModuleFunctionalTest extends \PHPUnit_Extensions_Selenium2TestCase
|
||||
|
||||
/**
|
||||
* Unit test teardown
|
||||
* @return void
|
||||
* @return void
|
||||
*/
|
||||
public function tearDown()
|
||||
{
|
||||
@@ -296,7 +296,7 @@ class MyModuleFunctionalTest extends \PHPUnit_Extensions_Selenium2TestCase
|
||||
|
||||
/**
|
||||
* Global test teardown
|
||||
* @return void
|
||||
* @return void
|
||||
*/
|
||||
public static function tearDownAfterClass()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user