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

namespace GuzzleTestsLog;

use 
GuzzleLogClosureLogAdapter;

/**
 * @covers GuzzleLogClosureLogAdapter
 */
class ClosureLogAdapterTest extends GuzzleTestsGuzzleTestCase
{
    public function 
testClosure()
    {
        
$that $this;
        
$modified null;
        
$this->adapter = new ClosureLogAdapter(function($message$priority$extras null) use ($that, &$modified) {
            
$modified = array($message$priority$extras);
        });
        
$this->adapter->log('test'LOG_NOTICE'127.0.0.1');
        
$this->assertEquals(array('test'LOG_NOTICE'127.0.0.1'), $modified);
    }

    
/**
     * @expectedException InvalidArgumentException
     */
    
public function testThrowsExceptionWhenNotCallable()
    {
        
$this->adapter = new ClosureLogAdapter(123);
    }
}
Онлайн: 0
Реклама