Open Journal Systems  3.3.0
AbstractEntityBodyDecoratorTest.php
1 <?php
2 
3 namespace Guzzle\Tests\Http;
4 
6 
11 {
12  public function testDecoratesEntityBody()
13  {
14  $e = EntityBody::factory();
15  $mock = $this->getMockForAbstractClass('Guzzle\Http\AbstractEntityBodyDecorator', array($e));
16 
17  $this->assertSame($e->getStream(), $mock->getStream());
18  $this->assertSame($e->getContentLength(), $mock->getContentLength());
19  $this->assertSame($e->getSize(), $mock->getSize());
20  $this->assertSame($e->getContentMd5(), $mock->getContentMd5());
21  $this->assertSame($e->getContentType(), $mock->getContentType());
22  $this->assertSame($e->__toString(), $mock->__toString());
23  $this->assertSame($e->getUri(), $mock->getUri());
24  $this->assertSame($e->getStreamType(), $mock->getStreamType());
25  $this->assertSame($e->getWrapper(), $mock->getWrapper());
26  $this->assertSame($e->getWrapperData(), $mock->getWrapperData());
27  $this->assertSame($e->isReadable(), $mock->isReadable());
28  $this->assertSame($e->isWritable(), $mock->isWritable());
29  $this->assertSame($e->isConsumed(), $mock->isConsumed());
30  $this->assertSame($e->isLocal(), $mock->isLocal());
31  $this->assertSame($e->isSeekable(), $mock->isSeekable());
32  $this->assertSame($e->getContentEncoding(), $mock->getContentEncoding());
33  }
34 }
Guzzle\Tests\GuzzleTestCase
Definition: GuzzleTestCase.php:22
Guzzle\Http\EntityBody\factory
static factory($resource='', $size=null)
Definition: EntityBody.php:36
Guzzle\Http\EntityBody
Definition: EntityBody.php:13
Guzzle\Tests\Http\AbstractEntityBodyDecoratorTest\testDecoratesEntityBody
testDecoratesEntityBody()
Definition: AbstractEntityBodyDecoratorTest.php:12
Guzzle\Tests\Http\AbstractEntityBodyDecoratorTest
Definition: AbstractEntityBodyDecoratorTest.php:10
Guzzle\Tests\Http
Definition: AbstractEntityBodyDecoratorTest.php:3