ComposerTest.php 812 B

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