File tree Expand file tree Collapse file tree 3 files changed +15
-13
lines changed Expand file tree Collapse file tree 3 files changed +15
-13
lines changed Original file line number Diff line number Diff line change 3
3
namespace Charcoal \Property ;
4
4
5
5
// From 'charcoal-property'
6
- use Charcoal \Property \StringProperty ;
6
+ use Charcoal \Property \TextProperty ;
7
7
8
8
/**
9
9
* HTML Property.
10
10
*
11
11
* The html property is a specialized string property.
12
12
*/
13
- class HtmlProperty extends StringProperty
13
+ class HtmlProperty extends TextProperty
14
14
{
15
+ const DEFAULT_LONG = true ;
16
+
17
+ /**
18
+ * @var boolean
19
+ */
20
+ protected $ long = self ::DEFAULT_LONG ;
21
+
15
22
/**
16
23
* The available filesystems (used in TinyMCE's elFinder media manager).
17
24
*
@@ -67,14 +74,4 @@ public function getAllowHtml()
67
74
{
68
75
return true ;
69
76
}
70
-
71
- /**
72
- * Get the SQL type (Storage format).
73
- *
74
- * @return string The SQL type
75
- */
76
- public function sqlType ()
77
- {
78
- return 'TEXT ' ;
79
- }
80
77
}
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ class TextProperty extends StringProperty
15
15
/**
16
16
* @var boolean
17
17
*/
18
- private $ long = self ::DEFAULT_LONG ;
18
+ protected $ long = self ::DEFAULT_LONG ;
19
19
20
20
/**
21
21
* @return string
Original file line number Diff line number Diff line change @@ -50,6 +50,7 @@ public function testDefaults()
50
50
$ this ->assertTrue ($ this ->obj ['allowNull ' ]);
51
51
$ this ->assertTrue ($ this ->obj ['allowHtml ' ]);
52
52
$ this ->assertTrue ($ this ->obj ['active ' ]);
53
+ $ this ->assertTrue ($ this ->obj ['long ' ]);
53
54
}
54
55
55
56
/**
@@ -66,7 +67,11 @@ public function testDefaultMaxLength()
66
67
*/
67
68
public function testSqlType ()
68
69
{
70
+ $ this ->obj ->setLong (false );
69
71
$ this ->assertEquals ('TEXT ' , $ this ->obj ->sqlType ());
72
+
73
+ $ this ->obj ->setLong (true );
74
+ $ this ->assertEquals ('LONGTEXT ' , $ this ->obj ->sqlType ());
70
75
}
71
76
72
77
public function testFilesystem ()
You can’t perform that action at this time.
0 commit comments