Add simple (constructor) tests for Framework classes
parent
9b05f19338
commit
5f8adabb62
@ -0,0 +1,20 @@
|
||||
<?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");
|
||||
}
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
<?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");
|
||||
}
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
<?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");
|
||||
}
|
||||
}
|
@ -0,0 +1,28 @@
|
||||
<?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);
|
||||
}
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
<?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");
|
||||
}
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
<?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");
|
||||
}
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
<?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");
|
||||
}
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
<?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");
|
||||
}
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
<?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");
|
||||
}
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
<?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");
|
||||
}
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
<?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");
|
||||
}
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
<?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");
|
||||
}
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
<?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");
|
||||
}
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
<?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");
|
||||
}
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
<?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");
|
||||
}
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
<?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");
|
||||
}
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
<?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");
|
||||
}
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
<?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");
|
||||
}
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
<?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");
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue