<commit_before><commit_msg>Add test for LazyCollection.<commit_after><?php

namespace Doctrine\SkeletonMapper\Tests\Collections;

use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\SkeletonMapper\Collections\LazyCollection;
use PHPUnit_Framework_TestCase;

class LazyCollectionTest extends PHPUnit_Framework_TestCase
{
    public function testLoad()
    {
        $wrappedCollection = new ArrayCollection();

        $collection = new LazyCollection(function() use ($wrappedCollection) {
            return $wrappedCollection;
        });

        $this->assertSame($wrappedCollection, $collection->getCollection());
    }
}
{'fraction_non_alphanumeric': 0.09448818897637795, 'fraction_numerical': 0.0, 'mean_word_length': 4.678571428571429, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3957765', 'n_tokens_mistral': 167, 'n_tokens_neox': 163, 'n_words': 31}