Skip to content

Instantly share code, notes, and snippets.

@flevour
Created February 28, 2011 14:55
Show Gist options
  • Save flevour/847417 to your computer and use it in GitHub Desktop.
Save flevour/847417 to your computer and use it in GitHub Desktop.
Testing 2 things in the same test method.
<?php
public function testIteratesOverOneElementArrays()
{
$iterator = new ArrayIterator(array('foo'));
$i = 0;
foreach ($iterator as $element) {
$this->assertEquals('foo', $element);
$i++;
}
$this->assertEquals(1, $i);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment