ComposerTest.php 823 B

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. use Codeception\Util\Fixtures;
  3. use Grav\Common\Composer;
  4. class ComposerTest extends \Codeception\TestCase\Test
  5. {
  6. protected function _before()
  7. {
  8. }
  9. protected function _after()
  10. {
  11. }
  12. public function testGetComposerLocation()
  13. {
  14. $composerLocation = Composer::getComposerLocation();
  15. $this->assertInternalType('string', $composerLocation);
  16. $this->assertSame('/', $composerLocation[0]);
  17. }
  18. public function testGetComposerExecutor()
  19. {
  20. $composerExecutor = Composer::getComposerExecutor();
  21. $this->assertInternalType('string', $composerExecutor);
  22. $this->assertSame('/', $composerExecutor[0]);
  23. $this->assertNotNull(strstr($composerExecutor, 'php'));
  24. $this->assertNotNull(strstr($composerExecutor, 'composer'));
  25. }
  26. }