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

testImportCountableRecords() public method

Tests that when the resource is countable the count is propagated to the outermost collection.
    public function testImportCountableRecords()
    {
        $records = $this->porter->import(new StaticDataImportSpecification(new \ArrayIterator(range(1, $count = 10))));
        // Innermost collection.
        self::assertInstanceOf(\Countable::class, $first = $records->findFirstCollection());
        self::assertCount($count, $first);
        // Outermost collection.
        self::assertInstanceOf(\Countable::class, $records);
        self::assertCount($count, $records);
    }