Development

Changeset 5938

You must first sign up to be able to contribute.

Changeset 5938

Show
Ignore:
Timestamp:
11/09/07 08:38:23 (1 year ago)
Author:
fabien
Message:

fixed unit tests

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/lib/util/sfDomCssSelector.class.php

    r5883 r5938  
    6666    $nodes = $this->getElements($selector); 
    6767 
    68     return $nodes ? new sfDomCssSelector($nodes[0]) : null
     68    return $nodes ? new sfDomCssSelector($nodes[0]) : new sfDomCssSelector(array())
    6969  } 
    7070 
     
    7373    $nodes = $this->getElements($selector); 
    7474 
    75     return $nodes ? new sfDomCssSelector($nodes) : null
     75    return $nodes ? new sfDomCssSelector($nodes) : new sfDomCssSelector(array())
    7676  } 
    7777 
  • trunk/test/unit/widget/sfWidgetFormDateTimeTest.php

    r5937 r5938  
    7373$dom->loadHTML($w->render('foo', '2005-10-15 12:30:35')); 
    7474$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'); 
    7676 
    7777// date and time options as array 
  • trunk/test/unit/widget/sfWidgetFormTimeTest.php

    r5937 r5938  
    7070$dom->loadHTML($w->render('foo', '12:30:35')); 
    7171$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');