diff --git a/api/tests/Etemplate/Widget/ContactEntryTest.php b/api/tests/Etemplate/Widget/ContactEntryTest.php index 4b598904c0..3481c5360f 100644 --- a/api/tests/Etemplate/Widget/ContactEntryTest.php +++ b/api/tests/Etemplate/Widget/ContactEntryTest.php @@ -22,11 +22,13 @@ require_once realpath(__DIR__.'/../WidgetBaseTest.php'); use EGroupware\Api\Etemplate; -class EntryTest extends \EGroupware\Api\Etemplate\WidgetBaseTest { +class ContactEntryTest extends \EGroupware\Api\Etemplate\WidgetBaseTest +{ const TEST_TEMPLATE = 'api.entry_test_contact'; - public static function setUpBeforeClass() : void { + public static function setUpBeforeClass() : void + { parent::setUpBeforeClass(); } diff --git a/api/tests/Storage/CustomfieldsTest.php b/api/tests/Storage/CustomfieldsTest.php index 3f0976a2f0..cf5d6abb3b 100644 --- a/api/tests/Storage/CustomfieldsTest.php +++ b/api/tests/Storage/CustomfieldsTest.php @@ -12,6 +12,7 @@ namespace EGroupware\Api\Storage; +require_once __DIR__ . '/../LoggedInTest.php'; use EGroupware\Api\LoggedInTest as LoggedInTest; class CustomfieldsTest extends LoggedInTest @@ -20,19 +21,19 @@ class CustomfieldsTest extends LoggedInTest protected $customfields = null; protected $simple_field = array( - 'app' => self::APP, - 'name' => 'test_field', - 'label' => 'Custom field', - 'type' => 'text', - 'type2' => array(), - 'help' => 'Custom field created for automated testing by CustomfieldsTest', - 'values' => null, - 'len' => null, - 'rows' => null, - 'order' => null, - 'needed' => null, - 'private' => array() - ); + 'app' => self::APP, + 'name' => 'test_field', + 'label' => 'Custom field', + 'type' => 'text', + 'type2' => array(), + 'help' => 'Custom field created for automated testing by CustomfieldsTest', + 'values' => null, + 'len' => null, + 'rows' => null, + 'order' => null, + 'needed' => null, + 'private' => array() + ); public function tearDown(): void { @@ -209,35 +210,35 @@ class CustomfieldsTest extends LoggedInTest // Expected options, file return array( array(array( - '' => 'Select', - 'Α'=> 'α Alpha', - 'Β'=> 'β Beta', - 'Γ'=> 'γ Gamma', - 'Δ'=> 'δ Delta', - 'Ε'=> 'ε Epsilon', - 'Ζ'=> 'ζ Zeta', - 'Η'=> 'η Eta', - 'Θ'=> 'θ Theta', - 'Ι'=> 'ι Iota', - 'Κ'=> 'κ Kappa', - 'Λ'=> 'λ Lambda', - 'Μ'=> 'μ Mu', - 'Ν'=> 'ν Nu', - 'Ξ'=> 'ξ Xi', - 'Ο'=> 'ο Omicron', - 'Π'=> 'π Pi', - 'Ρ'=> 'ρ Rho', - 'Σ'=> 'σ Sigma', - 'Τ'=> 'τ Tau', - 'Υ'=> 'υ Upsilon', - 'Φ'=> 'φ Phi', - 'Χ'=> 'χ Chi', - 'Ψ'=> 'ψ Psi', - 'Ω'=> 'ω Omega' - ), 'greek_options.php'), + '' => 'Select', + 'Α' => 'α Alpha', + 'Β' => 'β Beta', + 'Γ' => 'γ Gamma', + 'Δ' => 'δ Delta', + 'Ε' => 'ε Epsilon', + 'Ζ' => 'ζ Zeta', + 'Η' => 'η Eta', + 'Θ' => 'θ Theta', + 'Ι' => 'ι Iota', + 'Κ' => 'κ Kappa', + 'Λ' => 'λ Lambda', + 'Μ' => 'μ Mu', + 'Ν' => 'ν Nu', + 'Ξ' => 'ξ Xi', + 'Ο' => 'ο Omicron', + 'Π' => 'π Pi', + 'Ρ' => 'ρ Rho', + 'Σ' => 'σ Sigma', + 'Τ' => 'τ Tau', + 'Υ' => 'υ Upsilon', + 'Φ' => 'φ Phi', + 'Χ' => 'χ Chi', + 'Ψ' => 'ψ Psi', + 'Ω' => 'ω Omega' + ), 'greek_options.php'), array(array( - 'View Subs' => "egw_open('','infolog','list',{action:'sp',action_id:widget.getRoot().getArrayMgr('content').getEntry('info_id')},'infolog','infolog');" - ), 'infolog_subs_option.php') + 'View Subs' => "egw_open('','infolog','list',{action:'sp',action_id:widget.getRoot().getArrayMgr('content').getEntry('info_id')},'infolog','infolog');" + ), 'infolog_subs_option.php') ); } @@ -302,8 +303,8 @@ class CustomfieldsTest extends LoggedInTest protected function get_another_user() { $accounts = $GLOBALS['egw']->accounts->search(array( - 'type' => 'accounts' - )); + 'type' => 'accounts' + )); unset($accounts[$GLOBALS['egw_info']['user']['account_id']]); if(count($accounts) == 0) { diff --git a/api/tests/Storage/TestTracking.php b/api/tests/Storage/TestTracking.php index ec40f4f36c..e1e50df13f 100644 --- a/api/tests/Storage/TestTracking.php +++ b/api/tests/Storage/TestTracking.php @@ -14,8 +14,10 @@ namespace EGroupware\Api\Storage; +require_once __DIR__ . '/../../src/Storage/Tracking.php'; -class TestTracking extends Tracking { +class TestTracking extends Tracking +{ var $app = 'test'; diff --git a/api/tests/Storage/TrackingTest.php b/api/tests/Storage/TrackingTest.php index 9bfdb26dec..9b8dd92489 100644 --- a/api/tests/Storage/TrackingTest.php +++ b/api/tests/Storage/TrackingTest.php @@ -12,6 +12,7 @@ namespace EGroupware\Api\Storage; +require_once __DIR__ . '/../LoggedInTest.php'; require_once __DIR__ . '/TestTracking.php'; use EGroupware\Api; @@ -22,18 +23,18 @@ class TrackingTest extends LoggedInTest const APP = 'test'; protected $simple_field = array( - 'app' => self::APP, - 'name' => 'test_field', - 'label' => 'Custom field', - 'type' => 'text', - 'type2' => array(), - 'help' => 'Custom field created for automated testing by CustomfieldsTest', - 'values' => null, - 'len' => null, - 'rows' => null, - 'order' => null, - 'needed' => null, - 'private' => array() + 'app' => self::APP, + 'name' => 'test_field', + 'label' => 'Custom field', + 'type' => 'text', + 'type2' => array(), + 'help' => 'Custom field created for automated testing by CustomfieldsTest', + 'values' => null, + 'len' => null, + 'rows' => null, + 'order' => null, + 'needed' => null, + 'private' => array() ); /** @@ -57,8 +58,8 @@ class TrackingTest extends LoggedInTest // Get another user $accounts = $GLOBALS['egw']->accounts->search(array( - 'type' => 'accounts' - )); + 'type' => 'accounts' + )); unset($accounts[$GLOBALS['egw_info']['user']['account_id']]); if(count($accounts) == 0) {