Changeset 7611
- Timestamp:
- 02/26/08 13:38:11 (6 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/1.1/lib/routing/sfPatternRouting.class.php
r7525 r7611 422 422 423 423 // all params must be given 424 if ($diff = array_diff_key($variables, array_filter($tparams )))424 if ($diff = array_diff_key($variables, array_filter($tparams, create_function('$v', 'return !is_null($v);')))) 425 425 { 426 426 throw new InvalidArgumentException(sprintf('The "%s" route has some missing mandatory parameters (%s).', $name, implode(', ', $diff))); branches/1.1/test/unit/routing/sfPatternRoutingTest.php
r7525 r7611 11 11 require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); 12 12 13 $t = new lime_test(12 2, new lime_output_color());13 $t = new lime_test(123, new lime_output_color()); 14 14 15 15 class sfPatternRoutingTest extends sfPatternRouting … … 463 463 } 464 464 465 // parameters can be empty 466 $t->diag('parameters can be empty'); 467 $r->clearRoutes(); 468 $r->connect('test', '/test/:foo/:bar'); 469 $t->is($r->generate('test', array('foo' => 'bar', 'bar' => '')), '/test/bar/', '->generate() can take empty parameters'); 470 465 471 // default module/action overriding 466 472 $t->diag('module/action overriding');