Open Journal Systems
3.3.0
ParserRegistryTest.php
1
<?php
2
3
namespace
Guzzle\Tests\Parser
;
4
5
use
Guzzle\Parser\ParserRegistry
;
6
10
class
ParserRegistryTest
extends
\Guzzle\Tests\GuzzleTestCase
11
{
12
public
function
testStoresObjects
()
13
{
14
$r =
new
ParserRegistry
();
15
$c = new \stdClass();
16
$r->registerParser(
'foo'
, $c);
17
$this->assertSame($c, $r->getParser(
'foo'
));
18
}
19
20
public
function
testReturnsNullWhenNotFound
()
21
{
22
$r =
new
ParserRegistry
();
23
$this->assertNull($r->getParser(
'FOO'
));
24
}
25
26
public
function
testReturnsLazyLoadedDefault
()
27
{
28
$r =
new
ParserRegistry
();
29
$c = $r->getParser(
'cookie'
);
30
$this->assertInstanceOf(
'Guzzle\Parser\Cookie\CookieParser'
, $c);
31
$this->assertSame($c, $r->getParser(
'cookie'
));
32
}
33
}
Guzzle\Parser\ParserRegistry
Definition:
ParserRegistry.php:8
Guzzle\Tests\Parser\ParserRegistryTest
Definition:
ParserRegistryTest.php:10
Guzzle\Tests\GuzzleTestCase
Definition:
GuzzleTestCase.php:22
Guzzle\Tests\Parser
Guzzle\Tests\Parser\ParserRegistryTest\testReturnsLazyLoadedDefault
testReturnsLazyLoadedDefault()
Definition:
ParserRegistryTest.php:26
Guzzle\Tests\Parser\ParserRegistryTest\testStoresObjects
testStoresObjects()
Definition:
ParserRegistryTest.php:12
Guzzle\Tests\Parser\ParserRegistryTest\testReturnsNullWhenNotFound
testReturnsNullWhenNotFound()
Definition:
ParserRegistryTest.php:20
plugins
paymethod
paypal
lib
vendor
guzzle
guzzle
tests
Guzzle
Tests
Parser
ParserRegistryTest.php
Generated on Fri Aug 28 2020 14:52:59 for Open Journal Systems by
1.8.17