Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

add test case for Text_Plain_$type classes #420

Merged
merged 5 commits into from

2 participants

@adamgsoc2013

No description provided.

@adamgsoc2013

Hi Michal, this commit contain most of the transformations classes' testing. please help to have a review, thanks

...plugin/transformations/Text_Plain_Dateformat_test.php
((117 lines not shown))
+ $this->assertEquals(
+ "Plain",
+ Text_Plain_Dateformat::getMIMESubtype()
+ );
+ }
+
+ /**
+ * Test for applyTransformation
+ *
+ * @return void
+ *
+ * @group medium
+ */
+ public function testApplyTransformation()
+ {
+ $buffer = "PMA_BUFFER";
@nijel Owner
nijel added a note

Please check transformation code, you should pass either time integer here or timestamp (MySQL formatted).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
...s/plugin/transformations/Text_Plain_External_test.php
((121 lines not shown))
+ "Plain",
+ Text_Plain_External::getMIMESubtype()
+ );
+ }
+
+ /**
+ * Test for applyTransformation
+ *
+ * @return void
+ *
+ * @group medium
+ */
+ public function testApplyTransformation()
+ {
+ $buffer = "PMA_BUFFER";
+ $options = array("option1", "option2");
@nijel Owner
nijel added a note

Again, options passed are bogus here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
.../plugin/transformations/Text_Plain_Formatted_test.php
((112 lines not shown))
+ "Plain",
+ Text_Plain_Formatted::getMIMESubtype()
+ );
+ }
+
+ /**
+ * Test for applyTransformation
+ *
+ * @return void
+ *
+ * @group medium
+ */
+ public function testApplyTransformation()
+ {
+ $buffer = "PMA_BUFFER";
+ $options = array("option1", "option2");
@nijel Owner
nijel added a note

You should test it with some HTML content here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@nijel
Owner

One generic comment (I did not go through all tests): You pass same parameters to all transformations, what is simply wrong. You should test the behavior which transformation is doing and pass correct parameters to it.

@adamgsoc2013

Hi Michal, I have chosen better test case for testing now. can you help to have a review? thanks

@nijel nijel merged commit c602e34 into from
@maxday maxday referenced this pull request from a commit in maxday/phpmyadmin
@maxday maxday #420 $cfg['CharEditing']='textarea' for structure edit
Signed-off-by: Maxime DAVID <got2bex@gmail.com>
75ed815
@maxday maxday referenced this pull request from a commit in maxday/phpmyadmin
@maxday maxday #420 $cfg['CharEditing']='textarea' for structure edit a9d4e5d
@maxday maxday referenced this pull request from a commit in maxday/phpmyadmin
@maxday maxday #420 $cfg['CharEditing']='textarea' for structure edit
Signed-off-by: Maxime DAVID <got2bex@gmail.com>
47db82f
@maxday maxday referenced this pull request from a commit in maxday/phpmyadmin
@maxday maxday #420 $cfg['CharEditing']='textarea' for structure edit
Signed-off-by: Maxime DAVID <got2bex@gmail.com>
86707a6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.