CurlHttpAdapterTest.php 915 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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\CurlHttpAdapter;
  12. /**
  13. * @author William Durand <william.durand1@gmail.com>
  14. * @author Antoine Corcy <contact@sbin.dk>
  15. */
  16. class CurlHttpAdapterTest extends \PHPUnit_Framework_TestCase
  17. {
  18. protected $curl;
  19. protected function setUp()
  20. {
  21. $this->curl = new CurlHttpAdapter();
  22. }
  23. public function testGetNullContent()
  24. {
  25. $this->assertNull($this->curl->getContent(null));
  26. }
  27. public function testGetFalseContent()
  28. {
  29. $this->assertNull($this->curl->getContent(false));
  30. }
  31. public function testGetName()
  32. {
  33. $this->assertEquals('curl', $this->curl->getName());
  34. }
  35. }