ArraySourceIteratorTest.php 601B

123456789101112131415161718192021222324252627
  1. <?php
  2. namespace Exporter\Test\Source;
  3. use Exporter\Source\ArraySourceIterator;
  4. class ArraySourceIteratorTest extends \PHPUnit_Framework_TestCase
  5. {
  6. public function testHandler()
  7. {
  8. $data = array(
  9. array('john 1', 'doe', '1'),
  10. array('john 2', 'doe', '1'),
  11. array('john 3', 'doe', '1'),
  12. array('john 4', 'doe', '1'),
  13. );
  14. $iterator = new ArraySourceIterator($data);
  15. foreach ($iterator as $value) {
  16. $this->assertTrue(is_array($value));
  17. $this->assertEquals(3, count($value));
  18. }
  19. }
  20. }