Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Issue #1

  • Loading branch information...
commit c7632f0074b5a9ec289e0dade7fc7f3146f37561 1 parent a3cc973
@aur1mas aur1mas authored
View
36 tests/ExtJS/Form/Element/PasswordTest.php
@@ -0,0 +1,36 @@
+<?php
+/**
+ * test form element password
+ *
+ * @package ExtJS
+ * @author aur1mas <aur1mas@devnet.lt>
+ */
+require_once 'ExtJs/Form/Element/Password.php';
+class ExtJS_Form_Element_PasswordTest extends PHPUnit_Framework_TestCase
+{
+
+ /**
+ * Issue #1. https://github.com/mbt-lt/ExtJS/issues/1
+ *
+ * @return void
+ * @author aur1mas <aur1mas@devnet.lt>
+ */
+ public function testIsInputTypeCorrect()
+ {
+ $element1 = new ExtJS_Form_Element_Password('password');
+ $content1 = "{
+ fieldLabel: '',
+ name: 'password',
+ inputType: 'password',
+ xtype: 'textfield'}";
+ $this->assertSame($content1, $element1->render());
+
+ $elmement2 = new ExtJS_Form_Element_Password('password2');
+ $content2 = "{
+ fieldLabel: '',
+ name: 'password2',
+ inputType: 'password',
+ xtype: 'textfield'}";
+ $this->assertSame($content2, $elmement2->render());
+ }
+}
View
1  tests/bootstrap.php
@@ -1,5 +1,4 @@
<?php
-
define('ZF_PATH', '/Users/user/Sites/htdocs/Zend/'); // define Zend Framework path
if (realpath(ZF_PATH) === false) {
View
3  tests/phpunit.xml
@@ -1,6 +1,9 @@
<phpunit bootstrap="./bootstrap.php" colors="true">
<testsuite name="ExtJS PHP Wrapper Tests">
<directory>./ExtJS</directory>
+ <exclude>
+ <directory suffix=".php">/Users</directory>
+ </exclude>
</testsuite>
<logging>
<log type="coverage-html" target="./log/report" charset="UTF-8" yui="true" highlight="true"
Please sign in to comment.
Something went wrong with that request. Please try again.