ScriptFUSIONTest\Integration\Porter\PorterTest::testImportAndMapCountableRecords PHP Method

testImportAndMapCountableRecords() public method

Tests that when the resource is countable the count is propagated to the outermost collection via a mapped collection.
    public function testImportAndMapCountableRecords()
    {
        $records = $this->porter->import((new StaticDataImportSpecification(new \ArrayIterator(range(1, $count = 10))))->setMapping(\Mockery::mock(Mapping::class)));
        self::assertInstanceOf(CountableMappedRecords::class, $records->getPreviousCollection());
        self::assertInstanceOf(\Countable::class, $records);
        self::assertCount($count, $records);
    }