<?php // Call GtkTreeModelSortTest::main() if this source file is executed directly. if (!defined("PHPUnit_MAIN_METHOD")) { define("PHPUnit_MAIN_METHOD", "GtkTreeModelSortTest::main"); } require_once "PHPUnit/Framework/TestCase.php"; require_once "PHPUnit/Framework/TestSuite.php"; // You may remove the following line when all tests have been implemented. require_once "PHPUnit/Framework/IncompleteTestError.php"; /** * Test class for GtkTreeModelSort. * Generated by PHPUnit_Util_Skeleton on 2006-03-07 at 13:26:41. */ class GtkTreeModelSortTest extends PHPUnit_Framework_TestCase { /** * Runs the test methods of this class. * * @access public * @static */ public static function main() { require_once "PHPUnit/TextUI/TestRunner.php"; $suite = new PHPUnit_Framework_TestSuite("GtkTreeModelSortTest"); $result = PHPUnit_TextUI_TestRunner::run($suite); } /** * Sets up the fixture, for example, open a network connection. * This method is called before a test is executed. * * @access protected */ protected function setUp() { $this->mod = new GtkTreeStore(Gtk::TYPE_STRING); $this->a = $this->mod->append(null, array('a')); $this->b = $this->mod->append(null, array('b')); $this->c = $this->mod->append(null, array('c')); $this->tms = new GtkTreeModelSort($this->mod); $this->tms->set_default_sort_func(array($this, 'sortCallback')); $this->tms->set_sort_column_id(0, Gtk::SORT_ASCENDING); } /** * Tears down the fixture, for example, close a network connection. * This method is called after a test is executed. * * @access protected */ protected function tearDown() { } public function sortCallback($model, $iter1, $iter2) { var_dump($model, $iter1, $iter2); } /** * @todo Implement testClear_cache(). */ public function testClear_cache() { // Remove the following line when you implement this test. throw new PHPUnit_Framework_IncompleteTestError; } /** * */ public function testConvert_child_iter_to_iter() { $child_a = $this->mod->get_iter_first(); $this->assertNotNull($child_a); $this->assertType('GtkTreeIter', $child_a); $sort_a = $this->tms->convert_child_iter_to_iter($child_a); $this->assertNotNull($sort_a); $this->assertType('GtkTreeIter', $sort_a); $this->assertEquals( $this->mod->get_value($child_a, 0), $this->tms->get_value($sort_a, 0) ); } /** * @todo Implement testConvert_child_path_to_path(). */ public function testConvert_child_path_to_path() { // Remove the following line when you implement this test. throw new PHPUnit_Framework_IncompleteTestError; } /** * */ public function testConvert_iter_to_child_iter() { $sort_a = $this->tms->get_iter_first(); $this->assertNotNull($sort_a); $this->assertType('GtkTreeIter', $sort_a); $child_a = $this->tms->convert_iter_to_child_iter($sort_a); $this->assertNotNull($child_a); $this->assertType('GtkTreeIter', $child_a); $this->assertEquals( $this->tms->get_value($sort_a, 0), $this->mod->get_value($child_a, 0) ); } /** * @todo Implement testConvert_path_to_child_path(). */ public function testConvert_path_to_child_path() { // Remove the following line when you implement this test. throw new PHPUnit_Framework_IncompleteTestError; } /** * @todo Implement testGet_model(). */ public function testGet_model() { // Remove the following line when you implement this test. throw new PHPUnit_Framework_IncompleteTestError; } /** * @todo Implement testIter_is_valid(). */ public function testIter_is_valid() { // Remove the following line when you implement this test. throw new PHPUnit_Framework_IncompleteTestError; } /** * @todo Implement testReset_default_sort_func(). */ public function testReset_default_sort_func() { // Remove the following line when you implement this test. throw new PHPUnit_Framework_IncompleteTestError; } /** * @todo Implement testFilter_new(). */ public function testFilter_new() { // Remove the following line when you implement this test. throw new PHPUnit_Framework_IncompleteTestError; } /** * @todo Implement testForeach(). */ public function testForeach() { // Remove the following line when you implement this test. throw new PHPUnit_Framework_IncompleteTestError; } /** * @todo Implement testGet_column_type(). */ public function testGet_column_type() { // Remove the following line when you implement this test. throw new PHPUnit_Framework_IncompleteTestError; } /** * @todo Implement testGet_flags(). */ public function testGet_flags() { // Remove the following line when you implement this test. throw new PHPUnit_Framework_IncompleteTestError; } /** * @todo Implement testGet_iter(). */ public function testGet_iter() { // Remove the following line when you implement this test. throw new PHPUnit_Framework_IncompleteTestError; } /** * @todo Implement testGet_iter_first(). */ public function testGet_iter_first() { // Remove the following line when you implement this test. throw new PHPUnit_Framework_IncompleteTestError; } /** * @todo Implement testGet_iter_root(). */ public function testGet_iter_root() { // Remove the following line when you implement this test. throw new PHPUnit_Framework_IncompleteTestError; } /** * @todo Implement testGet_iter_from_string(). */ public function testGet_iter_from_string() { // Remove the following line when you implement this test. throw new PHPUnit_Framework_IncompleteTestError; } /** * @todo Implement testGet_n_columns(). */ public function testGet_n_columns() { // Remove the following line when you implement this test. throw new PHPUnit_Framework_IncompleteTestError; } /** * @todo Implement testGet_path(). */ public function testGet_path() { // Remove the following line when you implement this test. throw new PHPUnit_Framework_IncompleteTestError; } /** * @todo Implement testGet_string_from_iter(). */ public function testGet_string_from_iter() { // Remove the following line when you implement this test. throw new PHPUnit_Framework_IncompleteTestError; } /** * @todo Implement testGet_value(). */ public function testGet_value() { // Remove the following line when you implement this test. throw new PHPUnit_Framework_IncompleteTestError; } /** * @todo Implement testIter_children(). */ public function testIter_children() { // Remove the following line when you implement this test. throw new PHPUnit_Framework_IncompleteTestError; } /** * @todo Implement testIter_has_child(). */ public function testIter_has_child() { // Remove the following line when you implement this test. throw new PHPUnit_Framework_IncompleteTestError; } /** * @todo Implement testIter_n_children(). */ public function testIter_n_children() { // Remove the following line when you implement this test. throw new PHPUnit_Framework_IncompleteTestError; } /** * @todo Implement testIter_next(). */ public function testIter_next() { // Remove the following line when you implement this test. throw new PHPUnit_Framework_IncompleteTestError; } /** * @todo Implement testIter_nth_child(). */ public function testIter_nth_child() { // Remove the following line when you implement this test. throw new PHPUnit_Framework_IncompleteTestError; } /** * @todo Implement testIter_parent(). */ public function testIter_parent() { // Remove the following line when you implement this test. throw new PHPUnit_Framework_IncompleteTestError; } /** * @todo Implement testRef_node(). */ public function testRef_node() { // Remove the following line when you implement this test. throw new PHPUnit_Framework_IncompleteTestError; } /** * @todo Implement testRow_changed(). */ public function testRow_changed() { // Remove the following line when you implement this test. throw new PHPUnit_Framework_IncompleteTestError; } /** * @todo Implement testRow_deleted(). */ public function testRow_deleted() { // Remove the following line when you implement this test. throw new PHPUnit_Framework_IncompleteTestError; } /** * @todo Implement testRow_has_child_toggled(). */ public function testRow_has_child_toggled() { // Remove the following line when you implement this test. throw new PHPUnit_Framework_IncompleteTestError; } /** * @todo Implement testRow_inserted(). */ public function testRow_inserted() { // Remove the following line when you implement this test. throw new PHPUnit_Framework_IncompleteTestError; } /** * @todo Implement testUnref_node(). */ public function testUnref_node() { // Remove the following line when you implement this test. throw new PHPUnit_Framework_IncompleteTestError; } /** * @todo Implement testHas_default_sort_func(). */ public function testHas_default_sort_func() { // Remove the following line when you implement this test. throw new PHPUnit_Framework_IncompleteTestError; } /** * @todo Implement testSet_sort_column_id(). */ public function testSet_sort_column_id() { // Remove the following line when you implement this test. throw new PHPUnit_Framework_IncompleteTestError; } /** * @todo Implement testSort_column_changed(). */ public function testSort_column_changed() { // Remove the following line when you implement this test. throw new PHPUnit_Framework_IncompleteTestError; } } // Call GtkTreeModelSortTest::main() if this source file is executed directly. if (PHPUnit_MAIN_METHOD == "GtkTreeModelSortTest::main") { GtkTreeModelSortTest::main(); } ?>