Changeset 5938
- Timestamp:
- 11/09/07 08:38:23 (1 year ago)
- Files:
-
- trunk/lib/util/sfDomCssSelector.class.php (modified) (2 diffs)
- trunk/test/unit/widget/sfWidgetFormDateTimeTest.php (modified) (1 diff)
- trunk/test/unit/widget/sfWidgetFormTimeTest.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/lib/util/sfDomCssSelector.class.php
r5883 r5938 66 66 $nodes = $this->getElements($selector); 67 67 68 return $nodes ? new sfDomCssSelector($nodes[0]) : n ull;68 return $nodes ? new sfDomCssSelector($nodes[0]) : new sfDomCssSelector(array()); 69 69 } 70 70 … … 73 73 $nodes = $this->getElements($selector); 74 74 75 return $nodes ? new sfDomCssSelector($nodes) : n ull;75 return $nodes ? new sfDomCssSelector($nodes) : new sfDomCssSelector(array()); 76 76 } 77 77 trunk/test/unit/widget/sfWidgetFormDateTimeTest.php
r5937 r5938 73 73 $dom->loadHTML($w->render('foo', '2005-10-15 12:30:35')); 74 74 $css = new sfDomCssSelector($dom); 75 $t->is( $css->matchAll('#foo_hour'), null, '->render() does not render the time if the with_time option is disabled');75 $t->is(count($css->matchAll('#foo_hour')->getNodes()), 0, '->render() does not render the time if the with_time option is disabled'); 76 76 77 77 // date and time options as array trunk/test/unit/widget/sfWidgetFormTimeTest.php
r5937 r5938 70 70 $dom->loadHTML($w->render('foo', '12:30:35')); 71 71 $css = new sfDomCssSelector($dom); 72 $t->is(count($css->matchAll('#foo_second option') ), 0, '__construct() can enable or disable the seconds select box with the with_seconds option');72 $t->is(count($css->matchAll('#foo_second option')->getNodes()), 0, '__construct() can enable or disable the seconds select box with the with_seconds option');