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

namespace GuzzleTestsBatch;

use 
GuzzleBatchHistoryBatch;
use 
GuzzleBatchBatch;

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

        
$history = new HistoryBatch($batch);
        
$history->add('foo')->add('baz');
        
$this->assertEquals(array('foo''baz'), $history->getHistory());
        
$history->clearHistory();
        
$this->assertEquals(array(), $history->getHistory());
    }
}
Онлайн: 1
Реклама