Changeset 33373
- Timestamp:
- 03/08/12 16:45:46 (1 year ago)
- Files:
-
- branches/1.4/lib/util/sfBrowserBase.class.php (modified) (1 diff)
- branches/1.4/test/unit/util/sfBrowserTest.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/1.4/lib/util/sfBrowserBase.class.php
r28702 r33373 701 701 $query .= sprintf('|//button[.="%s" or @id="%s" or @name="%s"]', $name, $name, $name); 702 702 703 $list = $this->getResponseDomXpath()->query($query); 703 if (!$list = @$this->getResponseDomXpath()->query($query)) 704 { 705 throw new InvalidArgumentException(sprintf('The name "%s" is not valid', $name)); 706 } 704 707 705 708 $position = isset($options['position']) ? $options['position'] - 1 : 0; branches/1.4/test/unit/util/sfBrowserTest.php
r28702 r33373 11 11 require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); 12 12 13 $t = new lime_test(7 3);13 $t = new lime_test(74); 14 14 15 15 // ->click() … … 134 134 <input type="submit" id="orphaned-input-submit" /> 135 135 136 <ul class="css-selector-test"> 137 <li>my first <a href="myfirstlink">paragraph</a></li> 138 <li>my second <a href="mysecondlink">paragraph</a></li> 139 </ul> 140 136 141 </body> 137 142 </html> … … 312 317 } 313 318 319 list($method, $uri, $parameters) = $b->click('li:contains("first") a'); 320 $t->is($uri, 'myfirstlink', 'click accept css selectors without "[" or "]"'); 321 314 322 // ->call() 315 323 $t->diag('->call()');