I'm testing a website's dropdown menu to sort by Names.
$nameSort = array();
$numOfNames = $this->getXpathCount("//td[@class='entry']");
for($count = 1; $count <= $numOfNames; $count ++) {
$get = $this->getText("xpath=(//td/a[contains(@href, '')])[$count]");
array_push($nameSort, $get);
}
$test = sort($entrySort);
$this->assertEquals($entrySort, $test);
But it says "There was 1 failure:
NameTest::testNameTab true does not match expected type "array".