Merge pull request #413 from adamgsoc2013/UT_transform

add test for transformation class: Text_Plain_Append
This commit is contained in:
Michal Čihař 2013-06-12 00:05:19 -07:00
commit fc494c245b

View File

@ -0,0 +1,83 @@
<?php
/**
* Tests for Text_Plain_Append class
*
* @package PhpMyAdmin-test
*/
/*
* Include to test.
*/
require_once 'libraries/plugins/transformations/Text_Plain_Append.class.php';
/**
* Tests for Text_Plain_Append class
*
* @package PhpMyAdmin-test
*/
class Text_Plain_Append_Test extends PHPUnit_Framework_TestCase
{
/**
* Test for getInfo
*
* @return void
*
* @group medium
*/
public function testGetInfo()
{
$info = 'Appends text to a string. The only option is the text to be appended'
. ' (enclosed in single quotes, default empty string).';
$this->assertEquals(
$info,
Text_Plain_Append::getInfo()
);
}
/**
* Test for getName
*
* @return void
*
* @group medium
*/
public function testGetName()
{
$this->assertEquals(
"Append",
Text_Plain_Append::getName()
);
}
/**
* Test for getMIMEType
*
* @return void
*
* @group medium
*/
public function testGetMIMEType()
{
$this->assertEquals(
"Text",
Text_Plain_Append::getMIMEType()
);
}
/**
* Test for getMIMESubtype
*
* @return void
*
* @group medium
*/
public function testGetMIMESubtype()
{
$this->assertEquals(
"Plain",
Text_Plain_Append::getMIMESubtype()
);
}
}