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

namespace GuzzleTestsHttpCurl;

use 
GuzzleHttpCurlCurlVersion;

/**
 * @covers GuzzleHttpCurlCurlVersion
 */
class CurlVersionTest extends GuzzleTestsGuzzleTestCase
{
    public function 
testCachesCurlInfo()
    {
        
$info curl_version();
        
$instance CurlVersion::getInstance();

        
// Clear out the info cache
        
$refObject = new ReflectionObject($instance);
        
$refProperty $refObject->getProperty('version');
        
$refProperty->setAccessible(true);
        
$refProperty->setValue($instance, array());

        
$this->assertEquals($info$instance->getAll());
        
$this->assertEquals($info$instance->getAll());

        
$this->assertEquals($info['version'], $instance->get('version'));
        
$this->assertFalse($instance->get('foo'));
    }

    public function 
testIsSingleton()
    {
        
$refObject = new ReflectionClass('GuzzleHttpCurlCurlVersion');
        
$refProperty $refObject->getProperty('instance');
        
$refProperty->setAccessible(true);
        
$refProperty->setValue(nullnull);

        
$this->assertInstanceOf('GuzzleHttpCurlCurlVersion'CurlVersion::getInstance());
    }
}
Онлайн: 2
Реклама