Add simple (constructor) tests for Framework classes
19 files added
1 files modified
New file |
| | |
| | | <?php |
| | | |
| | | /** |
| | | * Test class to test rcube_base_replacer class |
| | | * |
| | | * @package Tests |
| | | */ |
| | | class Framework_BaseReplacer extends PHPUnit_Framework_TestCase |
| | | { |
| | | |
| | | /** |
| | | * Class constructor |
| | | */ |
| | | function test_class() |
| | | { |
| | | $object = new rcube_base_replacer('test'); |
| | | |
| | | $this->assertInstanceOf('rcube_base_replacer', $object, "Class constructor"); |
| | | } |
| | | } |
New file |
| | |
| | | <?php |
| | | |
| | | /** |
| | | * Test class to test rcube_browser class |
| | | * |
| | | * @package Tests |
| | | */ |
| | | class Framework_Browser extends PHPUnit_Framework_TestCase |
| | | { |
| | | |
| | | /** |
| | | * Class constructor |
| | | */ |
| | | function test_class() |
| | | { |
| | | $object = new rcube_browser(); |
| | | |
| | | $this->assertInstanceOf('rcube_browser', $object, "Class constructor"); |
| | | } |
| | | } |
New file |
| | |
| | | <?php |
| | | |
| | | /** |
| | | * Test class to test rcube_cache class |
| | | * |
| | | * @package Tests |
| | | */ |
| | | class Framework_Cache extends PHPUnit_Framework_TestCase |
| | | { |
| | | |
| | | /** |
| | | * Class constructor |
| | | */ |
| | | function test_class() |
| | | { |
| | | $object = new rcube_cache('db', 1); |
| | | |
| | | $this->assertInstanceOf('rcube_cache', $object, "Class constructor"); |
| | | } |
| | | } |
New file |
| | |
| | | <?php |
| | | |
| | | /** |
| | | * Test class to test rcube_charset class |
| | | * |
| | | * @package Tests |
| | | */ |
| | | class Framework_Charset extends PHPUnit_Framework_TestCase |
| | | { |
| | | |
| | | /** |
| | | * Data for test_clean() |
| | | */ |
| | | function data_clean() |
| | | { |
| | | return array( |
| | | array('', '', 'Empty string'), |
| | | ); |
| | | } |
| | | |
| | | /** |
| | | * @dataProvider data_clean |
| | | */ |
| | | function test_clean($input, $output, $title) |
| | | { |
| | | $this->assertEquals(rcube_charset::clean($input), $output, $title); |
| | | } |
| | | } |
New file |
| | |
| | | <?php |
| | | |
| | | /** |
| | | * Test class to test rcube_content_filter class |
| | | * |
| | | * @package Tests |
| | | */ |
| | | class Framework_ContentFilter extends PHPUnit_Framework_TestCase |
| | | { |
| | | |
| | | /** |
| | | * Class constructor |
| | | */ |
| | | function test_class() |
| | | { |
| | | $object = new rcube_content_filter(); |
| | | |
| | | $this->assertInstanceOf('rcube_content_filter', $object, "Class constructor"); |
| | | } |
| | | } |
New file |
| | |
| | | <?php |
| | | |
| | | /** |
| | | * Test class to test rcube_html class |
| | | * |
| | | * @package Tests |
| | | */ |
| | | class Framework_Html extends PHPUnit_Framework_TestCase |
| | | { |
| | | |
| | | /** |
| | | * Class constructor |
| | | */ |
| | | function test_class() |
| | | { |
| | | $object = new html; |
| | | |
| | | $this->assertInstanceOf('html', $object, "Class constructor"); |
| | | } |
| | | } |
New file |
| | |
| | | <?php |
| | | |
| | | /** |
| | | * Test class to test rcube_image class |
| | | * |
| | | * @package Tests |
| | | */ |
| | | class Framework_Image extends PHPUnit_Framework_TestCase |
| | | { |
| | | |
| | | /** |
| | | * Class constructor |
| | | */ |
| | | function test_class() |
| | | { |
| | | $object = new rcube_image('test'); |
| | | |
| | | $this->assertInstanceOf('rcube_image', $object, "Class constructor"); |
| | | } |
| | | } |
New file |
| | |
| | | <?php |
| | | |
| | | /** |
| | | * Test class to test rcube_imap class |
| | | * |
| | | * @package Tests |
| | | */ |
| | | class Framework_Imap extends PHPUnit_Framework_TestCase |
| | | { |
| | | |
| | | /** |
| | | * Class constructor |
| | | */ |
| | | function test_class() |
| | | { |
| | | $object = new rcube_imap; |
| | | |
| | | $this->assertInstanceOf('rcube_imap', $object, "Class constructor"); |
| | | } |
| | | } |
New file |
| | |
| | | <?php |
| | | |
| | | /** |
| | | * Test class to test rcube_imap_generic class |
| | | * |
| | | * @package Tests |
| | | */ |
| | | class Framework_ImapGeneric extends PHPUnit_Framework_TestCase |
| | | { |
| | | |
| | | /** |
| | | * Class constructor |
| | | */ |
| | | function test_class() |
| | | { |
| | | $object = new rcube_imap_generic; |
| | | |
| | | $this->assertInstanceOf('rcube_imap_generic', $object, "Class constructor"); |
| | | } |
| | | } |
New file |
| | |
| | | <?php |
| | | |
| | | /** |
| | | * Test class to test rcube_message_header class |
| | | * |
| | | * @package Tests |
| | | */ |
| | | class Framework_MessageHeader extends PHPUnit_Framework_TestCase |
| | | { |
| | | |
| | | /** |
| | | * Class constructor |
| | | */ |
| | | function test_class() |
| | | { |
| | | $object = new rcube_message_header; |
| | | |
| | | $this->assertInstanceOf('rcube_message_header', $object, "Class constructor"); |
| | | } |
| | | } |
New file |
| | |
| | | <?php |
| | | |
| | | /** |
| | | * Test class to test rcube_message_part class |
| | | * |
| | | * @package Tests |
| | | */ |
| | | class Framework_MessagePart extends PHPUnit_Framework_TestCase |
| | | { |
| | | |
| | | /** |
| | | * Class constructor |
| | | */ |
| | | function test_class() |
| | | { |
| | | $object = new rcube_message_part; |
| | | |
| | | $this->assertInstanceOf('rcube_message_part', $object, "Class constructor"); |
| | | } |
| | | } |
New file |
| | |
| | | <?php |
| | | |
| | | /** |
| | | * Test class to test rcube class |
| | | * |
| | | * @package Tests |
| | | */ |
| | | class Framework_Rcube extends PHPUnit_Framework_TestCase |
| | | { |
| | | |
| | | /** |
| | | * Class constructor |
| | | */ |
| | | function test_class() |
| | | { |
| | | $object = rcube::get_instance(); |
| | | |
| | | $this->assertInstanceOf('rcube', $object, "Class singleton"); |
| | | } |
| | | } |
New file |
| | |
| | | <?php |
| | | |
| | | /** |
| | | * Test class to test rcube_result_index class |
| | | * |
| | | * @package Tests |
| | | */ |
| | | class Framework_ResultIndex extends PHPUnit_Framework_TestCase |
| | | { |
| | | |
| | | /** |
| | | * Class constructor |
| | | */ |
| | | function test_class() |
| | | { |
| | | $object = new rcube_result_index; |
| | | |
| | | $this->assertInstanceOf('rcube_result_index', $object, "Class constructor"); |
| | | } |
| | | } |
New file |
| | |
| | | <?php |
| | | |
| | | /** |
| | | * Test class to test rcube_result_set class |
| | | * |
| | | * @package Tests |
| | | */ |
| | | class Framework_ResultSet extends PHPUnit_Framework_TestCase |
| | | { |
| | | |
| | | /** |
| | | * Class constructor |
| | | */ |
| | | function test_class() |
| | | { |
| | | $object = new rcube_result_set; |
| | | |
| | | $this->assertInstanceOf('rcube_result_set', $object, "Class constructor"); |
| | | } |
| | | } |
New file |
| | |
| | | <?php |
| | | |
| | | /** |
| | | * Test class to test rcube_result_thread class |
| | | * |
| | | * @package Tests |
| | | */ |
| | | class Framework_ResultThread extends PHPUnit_Framework_TestCase |
| | | { |
| | | |
| | | /** |
| | | * Class constructor |
| | | */ |
| | | function test_class() |
| | | { |
| | | $object = new rcube_result_thread; |
| | | |
| | | $this->assertInstanceOf('rcube_result_thread', $object, "Class constructor"); |
| | | } |
| | | } |
New file |
| | |
| | | <?php |
| | | |
| | | /** |
| | | * Test class to test rcube_smtp class |
| | | * |
| | | * @package Tests |
| | | */ |
| | | class Framework_Smtp extends PHPUnit_Framework_TestCase |
| | | { |
| | | |
| | | /** |
| | | * Class constructor |
| | | */ |
| | | function test_class() |
| | | { |
| | | $object = new rcube_smtp; |
| | | |
| | | $this->assertInstanceOf('rcube_smtp', $object, "Class constructor"); |
| | | } |
| | | } |
New file |
| | |
| | | <?php |
| | | |
| | | /** |
| | | * Test class to test rcube_spellchecker class |
| | | * |
| | | * @package Tests |
| | | */ |
| | | class Framework_Spellchecker extends PHPUnit_Framework_TestCase |
| | | { |
| | | |
| | | /** |
| | | * Class constructor |
| | | */ |
| | | function test_class() |
| | | { |
| | | $object = new rcube_spellchecker; |
| | | |
| | | $this->assertInstanceOf('rcube_spellchecker', $object, "Class constructor"); |
| | | } |
| | | } |
New file |
| | |
| | | <?php |
| | | |
| | | /** |
| | | * Test class to test rcube_string_replacer class |
| | | * |
| | | * @package Tests |
| | | */ |
| | | class Framework_StringReplacer extends PHPUnit_Framework_TestCase |
| | | { |
| | | |
| | | /** |
| | | * Class constructor |
| | | */ |
| | | function test_class() |
| | | { |
| | | $sr = new rcube_string_replacer; |
| | | |
| | | $this->assertInstanceOf('rcube_string_replacer', $sr, "Class constructor"); |
| | | } |
| | | } |
New file |
| | |
| | | <?php |
| | | |
| | | /** |
| | | * Test class to test rcube_user class |
| | | * |
| | | * @package Tests |
| | | */ |
| | | class Framework_User extends PHPUnit_Framework_TestCase |
| | | { |
| | | |
| | | /** |
| | | * Class constructor |
| | | */ |
| | | function test_class() |
| | | { |
| | | $user = new rcube_user; |
| | | |
| | | $this->assertInstanceOf('rcube_user', $user, "Class constructor"); |
| | | } |
| | | } |
| | |
| | | colors="true"> |
| | | <testsuites> |
| | | <testsuite name="All Tests"> |
| | | <file>Framework/BaseReplacer.php</file> |
| | | <file>Framework/Browser.php</file> |
| | | <file>Framework/Cache.php</file> |
| | | <file>Framework/Charset.php</file> |
| | | <file>Framework/ContentFilter.php</file> |
| | | <file>Framework/Html.php</file> |
| | | <file>Framework/Imap.php</file> |
| | | <file>Framework/ImapGeneric.php</file> |
| | | <file>Framework/Image.php</file> |
| | | <file>Framework/MessageHeader.php</file> |
| | | <file>Framework/MessagePart.php</file> |
| | | <file>Framework/Mime.php</file> |
| | | <file>Framework/Rcube.php</file> |
| | | <file>Framework/ResultIndex.php</file> |
| | | <file>Framework/ResultSet.php</file> |
| | | <file>Framework/ResultThread.php</file> |
| | | <file>Framework/Shared.php</file> |
| | | <file>Framework/Smtp.php</file> |
| | | <file>Framework/Spellchecker.php</file> |
| | | <file>Framework/StringReplacer.php</file> |
| | | <file>Framework/User.php</file> |
| | | <file>Framework/Utils.php</file> |
| | | <file>Framework/VCard.php</file> |
| | | <file>HtmlToText.php</file> |