1
1
<?php
2
2
/**
3
- * Zend Framework (http://framework.zend.com/)
4
- *
5
- * @link http://github.com/zendframework/zf2 for the canonical source repository
6
- * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
7
- * @license http://framework.zend.com/license/new-bsd New BSD License
3
+ * @see https://github.com/zendframework/zend-form for the canonical source repository
4
+ * @copyright Copyright (c) 2005-2018 Zend Technologies USA Inc. (https://www.zend.com)
5
+ * @license https://github.com/zendframework/zend-form/blob/master/LICENSE.md New BSD License
8
6
*/
9
7
10
8
namespace ZendTest \Form \View \Helper ;
@@ -24,7 +22,6 @@ class AbstractHelperTest extends CommonTestCase
24
22
public function setUp ()
25
23
{
26
24
$ this ->helper = $ this ->getMockForAbstractClass ('Zend\Form\View\Helper\AbstractHelper ' );
27
-
28
25
parent ::setUp ();
29
26
}
30
27
@@ -64,18 +61,18 @@ public function testWillNotEncodeValueAttributeValuesCorrectly()
64
61
public function addAttributesData ()
65
62
{
66
63
return [
67
- [ 'valid ' , 'valid="value" ' ],
68
- [ 'px-custom ' , 'px-custom="value" ' ],
69
- [ 'xlink:custom ' , 'xlink:custom="value" ' ],
70
- [ 'attr/ ' , null , true ],
71
- [ 'attr" ' , null , true ],
72
- [ 'attr \'' , null , true ],
73
- [ 'attr> ' , null , true ],
74
- [ 'attr=value ' , null , true ],
75
- [ 'at tr ' , null , true ],
76
- [ "at \ntr " , null , true ],
77
- [ "at \ttr " , null , true ],
78
- [ "at \ftr " , null , true ],
64
+ ' valid ' => [ 'valid ' , 'valid="value" ' ],
65
+ ' valid-prefix ' => [ 'px-custom ' , 'px-custom="value" ' ],
66
+ ' xml-ns ' => [ 'xlink:custom ' , 'xlink:custom="value" ' ],
67
+ ' invalid-slash ' => [ 'attr/ ' , null , true ],
68
+ ' invalid-double-quote ' => [ 'attr" ' , null , true ],
69
+ ' invalid-quote ' => [ 'attr \'' , null , true ],
70
+ ' invalid-gt ' => [ 'attr> ' , null , true ],
71
+ ' invalid-equals ' => [ 'attr=value ' , null , true ],
72
+ ' invalid-space ' => [ 'at tr ' , null , true ],
73
+ ' invalid-newline ' => [ "at \ntr " , null , true ],
74
+ ' invalid-tab ' => [ "at \ttr " , null , true ],
75
+ ' invalid-formfeed ' => [ "at \ftr " , null , true ],
79
76
];
80
77
}
81
78
@@ -99,19 +96,19 @@ public function testWillIncludeAdditionalAttributes($attribute, $expected = null
99
96
public function addAttributesPrefixData ()
100
97
{
101
98
return [
102
- [ 'v- ' , 'v-attr="value" ' ],
103
- [ 'custom- ' , 'custom-attr="value" ' ],
104
- [ 'xlink: ' , 'xlink:attr="value" ' ],
105
- [ 'abc ' , 'abcattr="value" ' ],
106
- [ 'custom/ ' , null , true ],
107
- [ 'custom" ' , null , true ],
108
- [ 'custom \'' , null , true ],
109
- [ 'custom> ' , null , true ],
110
- [ 'custom= ' , null , true ],
111
- [ 'custom ' , null , true ],
112
- [ "cus \ntom " , null , true ],
113
- [ "cus \ttom " , null , true ],
114
- [ "cus \ftom " , null , true ],
99
+ ' valid ' => [ 'v- ' , 'v-attr="value" ' ],
100
+ ' valid-dash ' => [ 'custom- ' , 'custom-attr="value" ' ],
101
+ ' xml-ns ' => [ 'xlink: ' , 'xlink:attr="value" ' ],
102
+ ' valid-nodash ' => [ 'abc ' , 'abcattr="value" ' ],
103
+ ' invalid-slash ' => [ 'custom/ ' , null , true ],
104
+ ' invalid-double-quote ' => [ 'custom" ' , null , true ],
105
+ ' invalid-quote ' => [ 'custom \'' , null , true ],
106
+ ' invalid-gt ' => [ 'custom> ' , null , true ],
107
+ ' invalid-equals ' => [ 'custom= ' , null , true ],
108
+ ' invalid-space ' => [ 'custom ' , null , true ],
109
+ ' invalid-newline ' => [ "cus \ntom " , null , true ],
110
+ ' invalid-tab ' => [ "cus \ttom " , null , true ],
111
+ ' invalid-formfeed ' => [ "cus \ftom " , null , true ],
115
112
];
116
113
}
117
114
0 commit comments