aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShitiz Garg <mail@dragooon.net>2014-06-18 01:45:08 +0530
committerShitiz Garg <mail@dragooon.net>2014-06-18 01:48:34 +0530
commite820143e87da13be621bcfb5c9cf65fa83389715 (patch)
tree7ddaa27c857fc09680ce71aa8ced451924795e10 /tests/profilefields
parent[ticket/12514] Add a few more tests for type_date (diff)
downloadphpbb-e820143e87da13be621bcfb5c9cf65fa83389715.tar.gz
phpbb-e820143e87da13be621bcfb5c9cf65fa83389715.tar.bz2
phpbb-e820143e87da13be621bcfb5c9cf65fa83389715.zip
[ticket/12514] Fix some formatting for tests
PHPBB3-12514
Diffstat (limited to 'tests/profilefields')
-rw-r--r--tests/profilefields/type_bool_test.php16
-rw-r--r--tests/profilefields/type_date_test.php114
-rw-r--r--tests/profilefields/type_dropdown_test.php48
-rw-r--r--tests/profilefields/type_url_test.php46
4 files changed, 112 insertions, 112 deletions
diff --git a/tests/profilefields/type_bool_test.php b/tests/profilefields/type_bool_test.php
index 0b1f2b8a30..91852f210b 100644
--- a/tests/profilefields/type_bool_test.php
+++ b/tests/profilefields/type_bool_test.php
@@ -73,12 +73,12 @@ class phpbb_profilefield_type_bool_test extends phpbb_test_case
public function validate_profile_field_data()
{
return array(
- array(
+ array(
false,
array('field_required' => true),
'FIELD_REQUIRED-field',
'Field should not accept empty values for required fields',
- ),
+ ),
);
}
@@ -97,24 +97,24 @@ class phpbb_profilefield_type_bool_test extends phpbb_test_case
public function profile_value_data()
{
return array(
- array(
+ array(
false,
array('field_show_novalue' => true),
'No',
'Field should output the default value',
- ),
- array(
+ ),
+ array(
false,
array('field_show_novalue' => false, 'field_length' => 2),
null,
'Field should not show anything for empty value',
- ),
- array(
+ ),
+ array(
0,
array(),
'Yes',
'Field should show the set value',
- ),
+ ),
);
}
diff --git a/tests/profilefields/type_date_test.php b/tests/profilefields/type_date_test.php
index b0ac114942..05bf72d0b9 100644
--- a/tests/profilefields/type_date_test.php
+++ b/tests/profilefields/type_date_test.php
@@ -63,22 +63,22 @@ class phpbb_profilefield_type_date_test extends phpbb_test_case
{
return array(
array(
- '01-01-2009',
- array('field_show_novalue' => true),
- '01/01/2009',
- 'Field should output the correctly formatted date',
+ '01-01-2009',
+ array('field_show_novalue' => true),
+ '01/01/2009',
+ 'Field should output the correctly formatted date',
),
array(
- null,
- array('field_show_novalue' => false),
- null,
- 'Field should leave empty value as is',
+ null,
+ array('field_show_novalue' => false),
+ null,
+ 'Field should leave empty value as is',
),
array(
- 'None',
- array('field_show_novalue' => true),
- 'None',
- 'Field should leave invalid value as is',
+ 'None',
+ array('field_show_novalue' => true),
+ 'None',
+ 'Field should leave invalid value as is',
),
);
}
@@ -99,71 +99,71 @@ class phpbb_profilefield_type_date_test extends phpbb_test_case
{
return array(
array(
- '',
- array('field_required' => true),
- 'FIELD_REQUIRED-field',
- 'Field should reject value for being empty',
+ '',
+ array('field_required' => true),
+ 'FIELD_REQUIRED-field',
+ 'Field should reject value for being empty',
),
array(
- '0125',
- array('field_required' => true),
- 'FIELD_REQUIRED-field',
- 'Field should reject value for being invalid',
+ '0125',
+ array('field_required' => true),
+ 'FIELD_REQUIRED-field',
+ 'Field should reject value for being invalid',
),
array(
- '01-01-2012',
- array(),
- false,
- 'Field should accept a valid value',
+ '01-01-2012',
+ array(),
+ false,
+ 'Field should accept a valid value',
),
array(
- '40-05-2009',
- array(),
- 'FIELD_INVALID_DATE-field',
- 'Field should reject value for being invalid',
+ '40-05-2009',
+ array(),
+ 'FIELD_INVALID_DATE-field',
+ 'Field should reject value for being invalid',
),
array(
- '12-30-2012',
- array(),
- 'FIELD_INVALID_DATE-field',
- 'Field should reject value for being invalid',
+ '12-30-2012',
+ array(),
+ 'FIELD_INVALID_DATE-field',
+ 'Field should reject value for being invalid',
),
array(
- 'string',
- array(),
- false,
- 'Field should reject value for being invalid',
+ 'string',
+ array(),
+ false,
+ 'Field should reject value for being invalid',
),
array(
- 'string',
- array('field_required' => true),
- 'FIELD_REQUIRED-field',
- 'Field should reject value for being invalid',
+ 'string',
+ array('field_required' => true),
+ 'FIELD_REQUIRED-field',
+ 'Field should reject value for being invalid',
),
array(
- 100,
- array(),
- false,
- 'Field should reject value for being invalid',
+ 100,
+ array(),
+ false,
+ 'Field should reject value for being invalid',
),
array(
- 100,
- array('field_required' => true),
- 'FIELD_REQUIRED-field',
- 'Field should reject value for being invalid',
+ 100,
+ array('field_required' => true),
+ 'FIELD_REQUIRED-field',
+ 'Field should reject value for being invalid',
),
array(
- null,
- array('field_required' => true),
- 'FIELD_REQUIRED-field',
- 'Field should reject value for being empty',
+ null,
+ array('field_required' => true),
+ 'FIELD_REQUIRED-field',
+ 'Field should reject value for being empty',
),
array(
- true,
- array('field_required' => true),
- 'FIELD_REQUIRED-field',
- 'Field should reject value for being empty',
- )
+ true,
+ array('field_required' => true),
+ 'FIELD_REQUIRED-field',
+ 'Field should reject value for being empty',
+ ),
);
}
diff --git a/tests/profilefields/type_dropdown_test.php b/tests/profilefields/type_dropdown_test.php
index dad843086d..ddc34f221f 100644
--- a/tests/profilefields/type_dropdown_test.php
+++ b/tests/profilefields/type_dropdown_test.php
@@ -76,30 +76,30 @@ class phpbb_profilefield_type_dropdown_test extends phpbb_test_case
public function validate_profile_field_data()
{
return array(
- array(
+ array(
7,
array(),
'FIELD_INVALID_VALUE-field',
'Invalid value should throw error',
- ),
- array(
+ ),
+ array(
2,
array(),
false,
'Valid value should not throw error'
- ),
- array(
+ ),
+ array(
0,
array(),
false,
'Empty value should be acceptible',
- ),
- array(
+ ),
+ array(
0,
array('field_required' => true),
'FIELD_REQUIRED-field',
'Required field should not accept empty value',
- ),
+ ),
);
}
@@ -119,28 +119,28 @@ class phpbb_profilefield_type_dropdown_test extends phpbb_test_case
{
return array(
array(
- 1,
- array('field_show_novalue' => true),
- 'Option 1',
- 'Field should output the given value',
+ 1,
+ array('field_show_novalue' => true),
+ 'Option 1',
+ 'Field should output the given value',
),
array(
- 4,
- array('field_show_novalue' => false),
- 'Option 4',
- 'Field should output the given value',
+ 4,
+ array('field_show_novalue' => false),
+ 'Option 4',
+ 'Field should output the given value',
),
array(
- '',
- array('field_show_novalue' => true),
- '<No Value>',
- 'Field should output nothing for empty value',
+ '',
+ array('field_show_novalue' => true),
+ '<No Value>',
+ 'Field should output nothing for empty value',
),
array(
- '',
- array('field_show_novalue' => false),
- null,
- 'Field should simply output null for empty value',
+ '',
+ array('field_show_novalue' => false),
+ null,
+ 'Field should simply output null for empty value',
),
);
}
diff --git a/tests/profilefields/type_url_test.php b/tests/profilefields/type_url_test.php
index fab86dc2c1..68ae0f6b7d 100644
--- a/tests/profilefields/type_url_test.php
+++ b/tests/profilefields/type_url_test.php
@@ -55,39 +55,39 @@ class phpbb_profilefield_type_url_test extends phpbb_test_case
return array(
array(
'',
- array('field_required' => true),
- 'FIELD_INVALID_URL-field',
- 'Field should reject empty field that is required',
+ array('field_required' => true),
+ 'FIELD_INVALID_URL-field',
+ 'Field should reject empty field that is required',
),
array(
- 'invalidURL',
- array(),
- 'FIELD_INVALID_URL-field',
- 'Field should reject invalid input',
+ 'invalidURL',
+ array(),
+ 'FIELD_INVALID_URL-field',
+ 'Field should reject invalid input',
),
array(
- 'http://onetwothree.example.io',
- array(),
- false,
- 'Field should accept valid URL',
+ 'http://onetwothree.example.io',
+ array(),
+ false,
+ 'Field should accept valid URL',
),
array(
- 'http://example.com/index.html?param1=test&param2=awesome',
- array(),
- false,
- 'Field should accept valid URL',
+ 'http://example.com/index.html?param1=test&param2=awesome',
+ array(),
+ false,
+ 'Field should accept valid URL',
),
array(
- 'http://example.com/index.html/test/path?document=get',
- array(),
- false,
- 'Field should accept valid URL',
+ 'http://example.com/index.html/test/path?document=get',
+ array(),
+ false,
+ 'Field should accept valid URL',
),
array(
- 'http://example.com/index.html/test/path?document[]=DocType%20test&document[]=AnotherDoc',
- array(),
- 'FIELD_INVALID_URL-field',
- 'Field should reject invalid URL having multi value parameters',
+ 'http://example.com/index.html/test/path?document[]=DocType%20test&document[]=AnotherDoc',
+ array(),
+ 'FIELD_INVALID_URL-field',
+ 'Field should reject invalid URL having multi value parameters',
),
);
}