GuzzleHttpAdapterTest.php 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <?php
  2. /**
  3. * This file is part of the HttpAdapter library.
  4. *
  5. * (c) Antoine Corcy <contact@sbin.dk>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. namespace Tests\HttpAdapter;
  11. use HttpAdapter\GuzzleHttpAdapter;
  12. /**
  13. * @author Michael Dowling <michael@guzzlephp.org>
  14. * @author Antoine Corcy <contact@sbin.dk>
  15. */
  16. class GuzzleHttpAdapterTest extends \PHPUnit_Framework_TestCase
  17. {
  18. protected $guzzle;
  19. protected function setUp()
  20. {
  21. if (!class_exists('Guzzle\Service\Client')) {
  22. $this->markTestSkipped('Guzzle library has to be installed');
  23. }
  24. $this->guzzle = new GuzzleHttpAdapter();
  25. }
  26. public function testGetNullContent()
  27. {
  28. $this->assertNull($this->guzzle->getContent(null));
  29. }
  30. public function testGetFalseContent()
  31. {
  32. $this->assertNull($this->guzzle->getContent(false));
  33. }
  34. public function testGetName()
  35. {
  36. $this->assertEquals('guzzle', $this->guzzle->getName());
  37. }
  38. }