add test case for Text_Plain_$type classes #420

Merged
merged 5 commits into from Jun 14, 2013

Projects

None yet

2 participants

@adamgsoc2013
Contributor

No description provided.

@adamgsoc2013
Contributor

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

@nijel nijel commented on an outdated diff Jun 13, 2013
...plugin/transformations/Text_Plain_Dateformat_test.php
+ $this->assertEquals(
+ "Plain",
+ Text_Plain_Dateformat::getMIMESubtype()
+ );
+ }
+
+ /**
+ * Test for applyTransformation
+ *
+ * @return void
+ *
+ * @group medium
+ */
+ public function testApplyTransformation()
+ {
+ $buffer = "PMA_BUFFER";
@nijel
nijel Jun 13, 2013 Member

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

@nijel nijel commented on an outdated diff Jun 13, 2013
...s/plugin/transformations/Text_Plain_External_test.php
+ "Plain",
+ Text_Plain_External::getMIMESubtype()
+ );
+ }
+
+ /**
+ * Test for applyTransformation
+ *
+ * @return void
+ *
+ * @group medium
+ */
+ public function testApplyTransformation()
+ {
+ $buffer = "PMA_BUFFER";
+ $options = array("option1", "option2");
@nijel
nijel Jun 13, 2013 Member

Again, options passed are bogus here.

@nijel nijel commented on an outdated diff Jun 13, 2013
.../plugin/transformations/Text_Plain_Formatted_test.php
+ "Plain",
+ Text_Plain_Formatted::getMIMESubtype()
+ );
+ }
+
+ /**
+ * Test for applyTransformation
+ *
+ * @return void
+ *
+ * @group medium
+ */
+ public function testApplyTransformation()
+ {
+ $buffer = "PMA_BUFFER";
+ $options = array("option1", "option2");
@nijel
nijel Jun 13, 2013 Member

You should test it with some HTML content here.

@nijel
Member
nijel commented Jun 13, 2013

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
Contributor

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 phpmyadmin:master Jun 14, 2013

1 check passed

default The Travis CI build passed
Details
@maxday maxday added a commit to maxday/phpmyadmin that referenced this pull request Mar 26, 2014
@maxday maxday #420 $cfg['CharEditing']='textarea' for structure edit
Signed-off-by: Maxime DAVID <got2bex@gmail.com>
75ed815
@maxday maxday added a commit to maxday/phpmyadmin that referenced this pull request Mar 26, 2014
@maxday maxday #420 $cfg['CharEditing']='textarea' for structure edit a9d4e5d
@maxday maxday added a commit to maxday/phpmyadmin that referenced this pull request Mar 26, 2014
@maxday maxday #420 $cfg['CharEditing']='textarea' for structure edit
Signed-off-by: Maxime DAVID <got2bex@gmail.com>
47db82f
@maxday maxday added a commit to maxday/phpmyadmin that referenced this pull request Mar 26, 2014
@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