spec\LdapTools\Operation\BatchModifyOperationSpec::it_should_clone_the_batch_collection PHP Метод

it_should_clone_the_batch_collection() публичный Метод

    function it_should_clone_the_batch_collection()
    {
        $batch = new Batch(Batch::TYPE['ADD'], 'foo', 'bar');
        $batches = new BatchCollection();
        $batches->add($batch);
        $operation = new BatchModifyOperation('foo', $batches);
        $new = clone $operation;
        $batch->setAttribute('foobar');
        $this->setBatchCollection($new->getBatchCollection());
        $this->getBatchCollection()->get(0)->getAttribute()->shouldNotBeEqualTo('foobar');
    }