Вход Регистрация
Файл: vkolhoze.com/vendor/guzzle/guzzle/tests/Guzzle/Tests/Batch/AbstractBatchDecoratorTest.php
Строк: 11
<?php

namespace GuzzleTestsBatch;

use 
GuzzleBatchBatch;

/**
 * @covers GuzzleBatchAbstractBatchDecorator
 */
class AbstractBatchDecoratorTest extends GuzzleTestsGuzzleTestCase
{
    public function 
testProxiesToWrappedObject()
    {
        
$batch = new Batch(
            
$this->getMock('GuzzleBatchBatchTransferInterface'),
            
$this->getMock('GuzzleBatchBatchDivisorInterface')
        );

        
$decoratorA $this->getMockBuilder('GuzzleBatchAbstractBatchDecorator')
            ->
setConstructorArgs(array($batch))
            ->
getMockForAbstractClass();

        
$decoratorB $this->getMockBuilder('GuzzleBatchAbstractBatchDecorator')
            ->
setConstructorArgs(array($decoratorA))
            ->
getMockForAbstractClass();

        
$decoratorA->add('foo');
        
$this->assertFalse($decoratorB->isEmpty());
        
$this->assertFalse($batch->isEmpty());
        
$this->assertEquals(array($decoratorB$decoratorA), $decoratorB->getDecorators());
        
$this->assertEquals(array(), $decoratorB->flush());
    }
}
Онлайн: 1
Реклама