?iť?

Your IP : 3.146.255.87


Current Path : /home/s/c/g/scgforma/www/cloud/3rdparty/guzzle/guzzle/tests/Guzzle/Tests/Iterator/
Upload File :
Current File : /home/s/c/g/scgforma/www/cloud/3rdparty/guzzle/guzzle/tests/Guzzle/Tests/Iterator/MapIteratorTest.php

<?php

namespace Guzzle\Tests\Iterator;

use Guzzle\Iterator\MapIterator;

/**
 * @covers Guzzle\Iterator\MapIterator
 */
class MapIteratorTest extends \PHPUnit_Framework_TestCase
{
    public function testFiltersValues()
    {
        $i = new MapIterator(new \ArrayIterator(range(0, 100)), function ($value) {
            return $value * 10;
        });

        $this->assertEquals(range(0, 1000, 10), iterator_to_array($i, false));
    }

    /**
     * @expectedException \InvalidArgumentException
     */
    public function testValidatesCallable()
    {
        $i = new MapIterator(new \ArrayIterator(), new \stdClass());
    }
}