Skip to content

Instantly share code, notes, and snippets.

@Achal-Aggarwal
Created March 15, 2014 09:11
Show Gist options
  • Save Achal-Aggarwal/9563815 to your computer and use it in GitHub Desktop.
Save Achal-Aggarwal/9563815 to your computer and use it in GitHub Desktop.
Test issue with password field
diff --git a/tests/unit/suites/libraries/joomla/form/fields/JFormFieldPasswordTest.php b/tests/unit/suites/libraries/joomla/form/fields/JFormFieldPasswordTest.php
index 696da33..d1de9cc 100644
--- a/tests/unit/suites/libraries/joomla/form/fields/JFormFieldPasswordTest.php
+++ b/tests/unit/suites/libraries/joomla/form/fields/JFormFieldPasswordTest.php
@@ -158,6 +158,16 @@ class JFormFieldPasswordTest extends TestCase
$this->isTrue(),
'Line:' . __LINE__ . ' The property should be computed from the XML.'
);
+
+ // Test __set for meter property
+ $field->meter = "false";
+
+ $this->assertThat(
+ $field->meter,
+ $this->isFalse(),
+ 'Line:' . __LINE__ . ' The property is set explicitly through code.'
+ );
+
}
/**
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment