Permalink
Browse files

Issue #1

  • Loading branch information...
1 parent a3cc973 commit c7632f0074b5a9ec289e0dade7fc7f3146f37561 @aur1mas aur1mas committed Apr 5, 2012
Showing with 39 additions and 1 deletion.
  1. +36 −0 tests/ExtJS/Form/Element/PasswordTest.php
  2. +0 −1 tests/bootstrap.php
  3. +3 −0 tests/phpunit.xml
@@ -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,5 +1,4 @@
<?php
-
define('ZF_PATH', '/Users/user/Sites/htdocs/Zend/'); // define Zend Framework path
if (realpath(ZF_PATH) === false) {
View
@@ -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"

0 comments on commit c7632f0

Please sign in to comment.