FactoryTest.php 930 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. /*
  3. * This file is part of Composer.
  4. *
  5. * (c) Nils Adermann <naderman@naderman.de>
  6. * Jordi Boggiano <j.boggiano@seld.be>
  7. *
  8. * For the full copyright and license information, please view the LICENSE
  9. * file that was distributed with this source code.
  10. */
  11. namespace Composer\Test;
  12. use PHPUnit\Framework\TestCase;
  13. use Composer\Factory;
  14. class FactoryTest extends TestCase
  15. {
  16. /**
  17. * @group TLS
  18. */
  19. public function testDefaultValuesAreAsExpected()
  20. {
  21. $ioMock = $this->getMockBuilder('Composer\IO\IOInterface')->getMock();
  22. $ioMock->expects($this->once())
  23. ->method("writeError");
  24. $config = $this
  25. ->getMockBuilder('Composer\Config')
  26. ->getMock();
  27. $config->method('get')
  28. ->with($this->equalTo('disable-tls'))
  29. ->will($this->returnValue(true));
  30. Factory::createRemoteFilesystem($ioMock, $config);
  31. }
  32. }