Changeset 199 for trunk/trax/test
- Timestamp:
- 05/04/06 19:52:43 (6 years ago)
- Location:
- trunk/trax/test
- Files:
-
- 3 added
- 14 modified
-
ActionControllerTest.php (modified) (1 diff)
-
ActiveRecordTest.php (modified) (9 diffs)
-
AssetTagHelperTest.php (modified) (3 diffs)
-
FormHelperTest.php (modified) (1 diff)
-
InflectorTest.php (modified) (2 diffs)
-
TraxGeneratorTest.php (modified) (1 diff)
-
UrlHelperTest.php (modified) (2 diffs)
-
config/routes.php (modified) (1 prop)
-
controllers/application.php (modified) (1 diff, 1 prop)
-
controllers/catalog_controller.php (modified) (1 prop)
-
controllers/noclass_controller.php (modified) (1 prop)
-
mockActionController/action_controller.php (modified) (1 prop)
-
mockActiveRecord/active_record.php (modified) (1 prop)
-
public (added)
-
public/javascripts (added)
-
public/javascripts/application.js (added)
-
testenv.php (modified) (1 diff, 1 prop)
Legend:
- Unmodified
- Added
- Removed
-
trunk/trax/test/ActionControllerTest.php
r192 r199 20 20 // you don't really need a 'haas' account to test, 21 21 // the use of this prefix is purely syntactic 22 define("TRAX_URL_PREFIX", " ~haas");22 define("TRAX_URL_PREFIX", "/~haas"); 23 23 $GLOBALS['TRAX_INCLUDES'] = 24 24 array( "config" => "config", -
trunk/trax/test/ActiveRecordTest.php
r192 r199 428 428 429 429 /** 430 * Test the create() method431 * @todo Implement testCreate() (figure out create() first)432 */433 public function testCreate() {434 // Remove the following line when you implement this test.435 throw new PHPUnit2_Framework_IncompleteTestError;436 }437 438 /**439 430 * Test the add_error() method 440 431 */ … … 478 469 new DB_find_all_result); 479 470 $result = $p->find_all("SELECT mumble,foo FROM person_names"); 471 $this->assertTrue(is_array($result)); 480 472 481 473 // Conditions without "SELECT" should appear in WHERE clause … … 485 477 new DB_find_all_result); 486 478 $result = $p->find_all("last_name = 'Dover'"); 479 $this->assertTrue(is_array($result)); 487 480 488 481 // Orderings should appear in ORDER BY clause … … 492 485 new DB_find_all_result); 493 486 $result = $p->find_all(null, "last_name"); 487 $this->assertTrue(is_array($result)); 488 489 // Test limit 490 //$GLOBALS['ACTIVE_RECORD_DB']->expect_query( 491 // "SELECT * FROM person_names WHERE last_name = 'Dover' " 492 // . "ORDER BY last_name ", 493 // new DB_find_all_result); 494 //$result = $p->find_all("last_name = 'Dover'", "last_name", 495 // array(1,20)); 496 497 // Test joins 494 498 495 499 // Remove the following line when you implement this test. … … 697 701 698 702 /** 703 * Test the column_attribute_exists() method 704 * @todo Implement testColumn_attribute_exists() 705 */ 706 public function testColumn_attribute_exists() { 707 // Remove the following line when you implement this test. 708 throw new PHPUnit2_Framework_IncompleteTestError; 709 } 710 711 /** 699 712 * Test the column_for_attribute() method 700 713 * @todo Implement testColumn_for_attribute() … … 723 736 } 724 737 738 /** 739 * Test the create() method 740 * @todo Implement testCreate() 741 */ 742 public function testCreate() { 743 // Remove the following line when you implement this test. 744 throw new PHPUnit2_Framework_IncompleteTestError; 745 } 746 725 747 /** 726 748 * Test the delete() method … … 792 814 793 815 /** 816 * Test the get_association() method 817 * @todo Implement testGet_association() 818 */ 819 public function testGet_association() { 820 // Remove the following line when you implement this test. 821 throw new PHPUnit2_Framework_IncompleteTestError; 822 } 823 824 /** 794 825 * Test the get_errors() method 795 826 * @todo Implement testGet_errors() … … 827 858 } 828 859 860 /** 861 * Test the load() method 862 * @todo Implement testLoad() 863 */ 864 public function testLoad() { 865 // Remove the following line when you implement this test. 866 throw new PHPUnit2_Framework_IncompleteTestError; 867 } 868 869 /** 870 * Test the log_query() method 871 * @todo Implement testLog_query() 872 */ 873 public function testLog_query() { 874 // Remove the following line when you implement this test. 875 throw new PHPUnit2_Framework_IncompleteTestError; 876 } 877 829 878 /** 830 879 * Test the max_all() method … … 990 1039 991 1040 /** 992 * Test the _ get() method993 * @todo Implement test_ get()994 */ 995 public function test_ get() {1041 * Test the __get() method 1042 * @todo Implement test__get() 1043 */ 1044 public function test__get() { 996 1045 // Remove the following line when you implement this test. 997 1046 throw new PHPUnit2_Framework_IncompleteTestError; -
trunk/trax/test/AssetTagHelperTest.php
r192 r199 26 26 require_once "PHPUnit2/Framework/IncompleteTestError.php"; 27 27 28 // root Trax files in the test directory 29 define("TRAX_ROOT", dirname(__FILE__) . "/"); 30 define("TRAX_PUBLIC", dirname(__FILE__) . "/public"); 31 define("TRAX_URL_PREFIX", "/testprefix"); 32 define("TRAX_VIEWS_EXTENTION", "phtml"); 33 $GLOBALS['TRAX_INCLUDES'] = 34 array( "config" => "config", 35 "controllers" => "controllers", 36 "helpers" => "helpers", 37 "layouts" => "layouts", 38 "views" => "views"); 39 40 require_once "action_view/helpers.php"; 41 require_once "inflector.php"; 42 require_once "action_view/helpers/url_helper.php"; 43 require_once "action_view/helpers/asset_tag_helper.php"; 28 44 require_once "trax_exceptions.php"; 45 46 // parameters need by UrlHelper 47 $_SERVER['HTTP_HOST'] = 'www.example.com'; 48 $_SERVER['SERVER_PORT'] = '80'; 49 50 // referenced by the AssetTagHelper constructor 51 $GLOBALS['JAVASCRIPT_DEFAULT_SOURCES'] = array('this', 'that'); 29 52 30 53 /** … … 65 88 66 89 /** 67 * @todo Implement testConstruct(). 68 */ 69 public function testConstruct() { 70 // Remove the following line when you implement this test. 71 throw new PHPUnit2_Framework_IncompleteTestError; 72 } 73 74 /** 75 * @todo Implement testJavascript_path(). 90 * Test __construct() method 91 * 92 * Test the {@link AssetTagHelper::__construct()} method 93 */ 94 public function test__construct() { 95 $ath = new AssetTagHelper; 96 $this->assertTrue(is_object($ath)); 97 $this->assertEquals('AssetTagHelper', get_class($ath)); 98 $this->assertEquals(array('this','that'), 99 $ath->javascript_default_sources); 100 } 101 102 /** 103 * Test javascript_path() method 104 * 105 * Test the {@link AssetTagHelper::javascript_path()} method 76 106 */ 77 107 public function testJavascript_path() { 78 // Remove the following line when you implement this test. 79 throw new PHPUnit2_Framework_IncompleteTestError; 80 } 81 82 /** 83 * @todo Implement testJavascript_include_tag_method(). 108 $ath = new AssetTagHelper; 109 $this->assertEquals('/testprefix/javascripts/foo.js', 110 $ath->javascript_path('foo')); 111 $this->assertEquals('/testprefix/javascripts/foo.bar', 112 $ath->javascript_path('foo.bar')); 113 $this->assertEquals('/testprefix/foo.js', 114 $ath->javascript_path('/foo')); 115 $this->assertEquals('http://foo/bar', 116 $ath->javascript_path('http://foo/bar')); 117 } 118 119 /** 120 * Test javascript_include_tag() method 121 * 122 * Test the {@link AssetTagHelper::javascript_include_tag()} method 84 123 */ 85 124 public function testJavascript_include_tag_method() { 86 // Remove the following line when you implement this test. 87 throw new PHPUnit2_Framework_IncompleteTestError; 88 } 89 90 /** 91 * @todo Implement testJavascript_include_tag_function(). 125 $ath = new AssetTagHelper; 126 $this->assertEquals("<script src=\"/testprefix/javascripts/foo.js\"" 127 . " type=\"text/javascript\"></script>\n", 128 $ath->javascript_include_tag('foo')); 129 $this->assertEquals("<script src=\"/testprefix/javascripts/foo.js\"" 130 . " type=\"text/javascript\"></script>\n" 131 . "<script src=\"/testprefix/javascripts/bar.js\"" 132 . " type=\"text/javascript\"></script>\n", 133 $ath->javascript_include_tag('foo','bar')); 134 $this->assertEquals("<script src=\"/testprefix/javascripts/this.js\"" 135 . " type=\"text/javascript\"></script>\n" 136 . "<script src=\"/testprefix/javascripts/that.js\"" 137 . " type=\"text/javascript\"></script>\n" 138 . "<script src=\"/testprefix/javascripts/application.js\"" 139 . " type=\"text/javascript\"></script>\n", 140 $ath->javascript_include_tag('defaults')); 141 } 142 143 /** 144 * Test the javascript_include_tag() function 145 * 146 * Test the {@link javascript_include_tag()} function in 147 * procedural file {@link asset_tag_helper.php} 92 148 */ 93 149 public function testJavascript_include_tag_function() { 94 // Remove the following line when you implement this test. 95 throw new PHPUnit2_Framework_IncompleteTestError; 96 } 97 98 /** 99 * @todo Implement testStylesheet_path(). 150 $this->assertEquals("<script src=\"/testprefix/javascripts/foo.js\"" 151 . " type=\"text/javascript\"></script>\n", 152 javascript_include_tag('foo')); 153 } 154 155 /** 156 * Test stylesheet_path() method 157 * 158 * Test the {@link AssetTagHelper::stylesheet_path()} method 100 159 */ 101 160 public function testStylesheet_path() { 102 // Remove the following line when you implement this test. 103 throw new PHPUnit2_Framework_IncompleteTestError; 104 } 105 106 /** 107 * @todo Implement testStylesheet_link_tag_method(). 161 $ath = new AssetTagHelper; 162 $this->assertEquals('/testprefix/stylesheets/foo.css', 163 $ath->stylesheet_path('foo')); 164 $this->assertEquals('/testprefix/stylesheets/foo.bar', 165 $ath->stylesheet_path('foo.bar')); 166 $this->assertEquals('/testprefix/foo.css', 167 $ath->stylesheet_path('/foo')); 168 $this->assertEquals('http://foo/bar', 169 $ath->stylesheet_path('http://foo/bar')); 170 } 171 172 /** 173 * Test stylesheet_link_tag() method 174 * 175 * Test the {@link AssetTagHelper::stylesheet_link_tag()} method 108 176 */ 109 177 public function testStylesheet_link_tag_method() { 110 // Remove the following line when you implement this test. 111 throw new PHPUnit2_Framework_IncompleteTestError; 112 } 113 114 /** 115 * @todo Implement testStylesheet_link_tag_function(). 178 $ath = new AssetTagHelper; 179 $this->assertEquals('<link href="/testprefix/stylesheets/foo.css"' 180 . ' media="screen" rel="Stylesheet"' 181 . ' type="text/css" />'."\n", 182 $ath->stylesheet_link_tag("foo")); 183 $this->assertEquals('<link href="/testprefix/stylesheets/foo.css"' 184 . ' media="screen" rel="Stylesheet"' 185 . ' type="text/css" />'."\n" 186 . '<link href="/testprefix/stylesheets/bar.css"' 187 . ' media="screen" rel="Stylesheet"' 188 . ' type="text/css" />'."\n", 189 $ath->stylesheet_link_tag("foo","bar")); 190 $this->assertEquals('<link href="/testprefix/stylesheets/foo.css"' 191 . ' media="screen" rel="Screenstyle"' 192 . ' type="text/css" />'."\n", 193 $ath->stylesheet_link_tag("foo", 194 array("rel"=>"Screenstyle"))); 195 $this->assertEquals('<link href="/testprefix/stylesheets/foo.css"' 196 . ' media="all" rel="Stylesheet"' 197 . ' type="text/css" />'."\n", 198 $ath->stylesheet_link_tag("foo", 199 array("media"=>"all"))); 200 $this->assertEquals('<link href="/testprefix/stylesheets/foo.css"' 201 . ' media="screen" rel="Stylesheet"' 202 . ' type="text/plain" />'."\n", 203 $ath->stylesheet_link_tag("foo", 204 array("type"=>"text/plain"))); 205 $this->assertEquals('<link href="/bar/mumble.css"' 206 . ' media="screen" rel="Stylesheet"' 207 . ' type="text/css" />'."\n", 208 $ath->stylesheet_link_tag("foo", 209 array("href"=>"/bar/mumble.css"))); 210 } 211 212 /** 213 * Test stylesheet_link_tag() function 214 * 215 * Test the {@link stylesheet_link_tag()} function in procedural 216 * file {@link asset_tag_helper.php} 116 217 */ 117 218 public function testStylesheet_link_tag_function() { 118 // Remove the following line when you implement this test. 119 throw new PHPUnit2_Framework_IncompleteTestError; 120 } 121 122 /** 123 * @todo Implement testImage_path(). 219 $this->assertEquals('<link href="/testprefix/stylesheets/foo.css"' 220 . ' media="screen" rel="Stylesheet"' 221 . ' type="text/css" />'."\n", 222 stylesheet_link_tag("foo")); 223 } 224 225 /** 226 * Test image_path() method 227 * 228 * Test the {@link AssetTagHelper::image_path()} method 124 229 */ 125 230 public function testImage_path() { 126 // Remove the following line when you implement this test. 127 throw new PHPUnit2_Framework_IncompleteTestError; 128 } 129 130 /** 131 * @todo Implement testImage_tag_method(). 231 $ath = new AssetTagHelper; 232 $this->assertEquals('/testprefix/images/foo.png', 233 $ath->image_path('foo')); 234 $this->assertEquals('/testprefix/images/foo.bar', 235 $ath->image_path('foo.bar')); 236 $this->assertEquals('/testprefix/foo.png', 237 $ath->image_path('/foo')); 238 $this->assertEquals('http://foo/bar', 239 $ath->image_path('http://foo/bar')); 240 } 241 242 /** 243 * Test image_tag() method 244 * 245 * Test the {@link AssetTagHelper::image_tag()} method 132 246 */ 133 247 public function testImage_tag_method() { 134 // Remove the following line when you implement this test. 135 throw new PHPUnit2_Framework_IncompleteTestError; 136 } 137 138 /** 139 * @todo Implement testImage_tag_function(). 248 $ath = new AssetTagHelper; 249 $this->assertEquals('<img alt="Foo"' 250 . ' src="/testprefix/images/foo.png" />'."\n", 251 $ath->image_tag('foo')); 252 $this->assertEquals('<img alt="Bar"' 253 . ' src="/testprefix/images/foo.png" />'."\n", 254 $ath->image_tag('foo', array('alt' => 'Bar'))); 255 $this->assertEquals('<img alt="Foo" height="45"' 256 . ' src="/testprefix/images/foo.png"' 257 . ' width="30" />'."\n", 258 $ath->image_tag('foo', array('width' => '30', 259 'height' => '45'))); 260 $this->assertEquals('<img alt="Foo" height="45"' 261 . ' src="/testprefix/images/foo.png"' 262 . ' width="30" />'."\n", 263 $ath->image_tag('foo', array('size' => '30x45'))); 264 } 265 266 /** 267 * Test the image_tag() function 268 * 269 * Test the {@link image_tag()} function in procedural file 270 * {@link asset_helper.php} 140 271 */ 141 272 public function testImage_tag_function() { 142 // Remove the following line when you implement this test. 143 throw new PHPUnit2_Framework_IncompleteTestError; 273 $this->assertEquals('<img alt="Foo"' 274 . ' src="/testprefix/images/foo.png" />'."\n", 275 image_tag('foo')); 144 276 } 145 277 … … 148 280 */ 149 281 public function testAuto_discovery_link_tag_method() { 282 $ath = new AssetTagHelper; 150 283 // Remove the following line when you implement this test. 151 284 throw new PHPUnit2_Framework_IncompleteTestError; -
trunk/trax/test/FormHelperTest.php
r192 r199 66 66 67 67 /** 68 * Empty test to prevent failure 69 * @todo Write tests for FormHelper class 70 */ 71 public function testEmpty() { 72 } 68 * Test __construct() method 69 */ 70 public function test__construct() { 71 $uh = new FormHelper; 72 $this->assertTrue(is_object($uh)); 73 $this->assertEquals('FormHelper', get_class($uh)); 74 } 75 76 /** 77 * Test add_default_name_and_id() method 78 * @todo Implement this test 79 */ 80 public function testAdd_default_name_and_id_method() { 81 // Remove the following line when you implement this test. 82 throw new PHPUnit2_Framework_IncompleteTestError; 83 } 84 85 /** 86 * Test add_default_name_and_id() function 87 * @todo Implement this test 88 */ 89 public function testAdd_default_name_and_id_function() { 90 // Remove the following line when you implement this test. 91 throw new PHPUnit2_Framework_IncompleteTestError; 92 } 93 94 /** 95 * Test error_wrapping() method 96 * @todo Implement this test 97 */ 98 public function testError_wrapping_method() { 99 // Remove the following line when you implement this test. 100 throw new PHPUnit2_Framework_IncompleteTestError; 101 } 102 103 /** 104 * Test error_wrapping() function 105 * @todo Implement this test 106 */ 107 public function testError_wrapping_function() { 108 // Remove the following line when you implement this test. 109 throw new PHPUnit2_Framework_IncompleteTestError; 110 } 111 112 /** 113 * Test tag_id() method 114 * @todo Implement this test 115 */ 116 public function testTag_id_method() { 117 // Remove the following line when you implement this test. 118 throw new PHPUnit2_Framework_IncompleteTestError; 119 } 120 121 /** 122 * Test tag_id() function 123 * @todo Implement this test 124 */ 125 public function testTag_id_function() { 126 // Remove the following line when you implement this test. 127 throw new PHPUnit2_Framework_IncompleteTestError; 128 } 129 130 /** 131 * Test tag_id_with_index() method 132 * @todo Implement this test 133 */ 134 public function testTag_id_with_index_method() { 135 // Remove the following line when you implement this test. 136 throw new PHPUnit2_Framework_IncompleteTestError; 137 } 138 139 /** 140 * Test tag_id_with_index() function 141 * @todo Implement this test 142 */ 143 public function testTag_id_with_index_function() { 144 // Remove the following line when you implement this test. 145 throw new PHPUnit2_Framework_IncompleteTestError; 146 } 147 148 /** 149 * Test tag_name() method 150 * @todo Implement this test 151 */ 152 public function testTag_name_method() { 153 // Remove the following line when you implement this test. 154 throw new PHPUnit2_Framework_IncompleteTestError; 155 } 156 157 /** 158 * Test tag_name() function 159 * @todo Implement this test 160 */ 161 public function testTag_name_function() { 162 // Remove the following line when you implement this test. 163 throw new PHPUnit2_Framework_IncompleteTestError; 164 } 165 166 /** 167 * Test tag_name_with_index() method 168 * @todo Implement this test 169 */ 170 public function testTag_name_with_index_method() { 171 // Remove the following line when you implement this test. 172 throw new PHPUnit2_Framework_IncompleteTestError; 173 } 174 175 /** 176 * Test tag_name_with_index() function 177 * @todo Implement this test 178 */ 179 public function testTag_name_with_index_function() { 180 // Remove the following line when you implement this test. 181 throw new PHPUnit2_Framework_IncompleteTestError; 182 } 183 184 /** 185 * Test to_boolean_select_tag() method 186 * @todo Implement this test 187 */ 188 public function testTo_boolean_select_tag_method() { 189 // Remove the following line when you implement this test. 190 throw new PHPUnit2_Framework_IncompleteTestError; 191 } 192 193 /** 194 * Test to_boolean_select_tag() function 195 * @todo Implement this test 196 */ 197 public function testTo_boolean_select_tag_function() { 198 // Remove the following line when you implement this test. 199 throw new PHPUnit2_Framework_IncompleteTestError; 200 } 201 202 /** 203 * Test to_check_box_tag() method 204 * @todo Implement this test 205 */ 206 public function testTo_check_box_tag_method() { 207 // Remove the following line when you implement this test. 208 throw new PHPUnit2_Framework_IncompleteTestError; 209 } 210 211 /** 212 * Test to_check_box_tag() function 213 * @todo Implement this test 214 */ 215 public function testTo_check_box_tag_function() { 216 // Remove the following line when you implement this test. 217 throw new PHPUnit2_Framework_IncompleteTestError; 218 } 219 220 /** 221 * Test to_input_field_tag() method 222 * @todo Implement this test 223 */ 224 public function testTo_input_field_tag_method() { 225 // Remove the following line when you implement this test. 226 throw new PHPUnit2_Framework_IncompleteTestError; 227 } 228 229 /** 230 * Test to_input_field_tag() function 231 * @todo Implement this test 232 */ 233 public function testTo_input_field_tag_function() { 234 // Remove the following line when you implement this test. 235 throw new PHPUnit2_Framework_IncompleteTestError; 236 } 237 238 /** 239 * Test to_radio_button_tag() method 240 * @todo Implement this test 241 */ 242 public function testTo_radio_button_tag_method() { 243 // Remove the following line when you implement this test. 244 throw new PHPUnit2_Framework_IncompleteTestError; 245 } 246 247 /** 248 * Test to_radio_button_tag() function 249 * @todo Implement this test 250 */ 251 public function testTo_radio_button_tag_function() { 252 // Remove the following line when you implement this test. 253 throw new PHPUnit2_Framework_IncompleteTestError; 254 } 255 256 /** 257 * Test to_text_area_tag() method 258 * @todo Implement this test 259 */ 260 public function testTo_text_area_tag_method() { 261 // Remove the following line when you implement this test. 262 throw new PHPUnit2_Framework_IncompleteTestError; 263 } 264 265 /** 266 * Test to_text_area_tag() function 267 * @todo Implement this test 268 */ 269 public function testTo_text_area_tag_function() { 270 // Remove the following line when you implement this test. 271 throw new PHPUnit2_Framework_IncompleteTestError; 272 } 273 274 73 275 } 74 276 -
trunk/trax/test/InflectorTest.php
r192 r199 80 80 $this->assertEquals(Inflector::singularize('orders'), 'order'); 81 81 $this->assertEquals(Inflector::singularize('people'), 'person'); 82 $this->assertEquals(Inflector::singularize('processes'), 'process'); 82 83 $this->assertEquals(Inflector::singularize('queries'), 'query'); 83 84 } … … 126 127 $this->assertEquals(Inflector::classify('people'), 'Person'); 127 128 $this->assertEquals(Inflector::classify('queries'), 'Query'); 129 $this->assertEquals(Inflector::classify('accesses'), 'Access'); 130 echo Inflector::classify('Access')."\n"; 128 131 } 129 132 -
trunk/trax/test/TraxGeneratorTest.php
r198 r199 354 354 ob_start(); 355 355 $tg->generate_scaffold('PersonName', 'membership'); 356 356 357 $output = ob_get_clean(); 357 358 $this->assertContains('create', $output); -
trunk/trax/test/UrlHelperTest.php
r192 r199 26 26 require_once "PHPUnit2/Framework/IncompleteTestError.php"; 27 27 28 define("TRAX_URL_PREFIX", "/testprefix"); 29 28 30 require_once "action_view/helpers.php"; 29 31 require_once "action_view/helpers/form_helper.php"; 30 require_once "action_view/helpers/form_options_helper.php"; 32 require_once "action_view/helpers/url_helper.php"; 33 34 // parameters need by UrlHelper 35 $_SERVER['HTTP_HOST'] = 'www.example.com'; 36 $_SERVER['SERVER_PORT'] = '80'; 37 $GLOBALS['current_controller_path'] = 'testcontrol'; 31 38 32 39 /** … … 67 74 68 75 /** 69 * Empty test to prevent failure 70 * @todo Write test for the UrlHelper class 71 */ 72 public function testEmpty() { 76 * Test __construct() method 77 */ 78 public function test__construct() { 79 $uh = new UrlHelper; 80 $this->assertTrue(is_object($uh)); 81 $this->assertEquals('UrlHelper', get_class($uh)); 82 } 83 84 /** 85 * Test button_to() method 86 * @todo Implement this test 87 */ 88 public function testButton_to_method() { 89 // Remove the following line when you implement this test. 90 throw new PHPUnit2_Framework_IncompleteTestError; 91 } 92 93 /** 94 * Test button_to() function 95 * @todo Implement this test 96 */ 97 public function testButton_to_function() { 98 // Remove the following line when you implement this test. 99 throw new PHPUnit2_Framework_IncompleteTestError; 100 } 101 102 /** 103 * Test convert_boolean_attributes() method 104 * @todo Implement this test 105 */ 106 public function testConvert_boolean_attributes() { 107 // Remove the following line when you implement this test. 108 throw new PHPUnit2_Framework_IncompleteTestError; 109 } 110 111 /** 112 * Test convert_confirm_option_to_javascript() method 113 * @todo Implement this test 114 */ 115 public function testConvert_confirm_option_to_javascript() { 116 // Remove the following line when you implement this test. 117 throw new PHPUnit2_Framework_IncompleteTestError; 118 } 119 120 /** 121 * Test link_image_to() method 122 * @todo Implement this test 123 */ 124 public function testLink_image_to_method() { 125 // Remove the following line when you implement this test. 126 throw new PHPUnit2_Framework_IncompleteTestError; 127 } 128 129 /** 130 * Test link_image_to() function 131 * @todo Implement this test 132 */ 133 public function testLink_image_to_function() { 134 // Remove the following line when you implement this test. 135 throw new PHPUnit2_Framework_IncompleteTestError; 136 } 137 138 /** 139 * Test link_to() method 140 * @todo Implement this test 141 */ 142 public function testLink_to_method() { 143 // Remove the following line when you implement this test. 144 throw new PHPUnit2_Framework_IncompleteTestError; 145 } 146 147 /** 148 * Test link_to() function 149 * @todo Implement this test 150 */ 151 public function testLink_to_function() { 152 // Remove the following line when you implement this test. 153 throw new PHPUnit2_Framework_IncompleteTestError; 154 } 155 156 /** 157 * Test url_for() method 158 * 159 * Thest the {@link UrlHelper::url_for()} method 160 */ 161 public function testUrl_for_method() { 162 $uh = new UrlHelper; 163 $this->assertEquals('http://www.example.com/testprefix/testcontrol', 164 $uh->url_for()); 165 $this->assertEquals('http://www.example.com/testprefix/foocontrol', 166 $uh->url_for(array(':controller'=>'foocontrol'))); 167 $this->assertEquals('http://www.example.com/testprefix' 168 . '/barcontrol/fooaction', 169 $uh->url_for(array(':controller'=>'barcontrol', 170 ':action' =>'fooaction'))); 171 $this->assertEquals('http://www.example.com/testprefix' 172 . '/barcontrol/baraction/fooid', 173 $uh->url_for(array(':controller'=> 'barcontrol', 174 ':action' => 'baraction', 175 ':id' => 'fooid'))); 176 } 177 178 /** 179 * Test url_for() function 180 * 181 * Test the {@link url_for()} function in the {@link url_helper.php} 182 * procedural file. 183 */ 184 public function testUrl_for_function() { 185 $this->assertEquals('http://www.example.com/testprefix/testcontrol', 186 url_for()); 73 187 } 74 188 } -
trunk/trax/test/config/routes.php
- Property svn:keywords set to Id
-
trunk/trax/test/controllers/application.php
- Property svn:keywords set to Id
r192 r199 4 4 * 5 5 * @package PHPonTraxTest 6 * $Id$ 6 7 */ 7 8 -
trunk/trax/test/controllers/catalog_controller.php
- Property svn:keywords set to Id
-
trunk/trax/test/controllers/noclass_controller.php
- Property svn:keywords set to Id
-
trunk/trax/test/mockActionController/action_controller.php
- Property svn:keywords set to Id
-
trunk/trax/test/mockActiveRecord/active_record.php
- Property svn:keywords set to Id
-
trunk/trax/test/testenv.php
- Property svn:keywords set to Id
r192 r199 8 8 * @license http://opensource.org/licenses/gpl-license.php GNU Public License 9 9 * @copyright (c) Walter O. Haas 2006 10 * @version $Id : TraxErrorTest.php 163 2006-03-07 16:44:21Z haas$10 * @version $Id$ 11 11 * @author Walt Haas <haas@xmission.com> 12 12 */
