mirror of
https://github.com/getgrav/grav.git
synced 2026-03-22 20:41:39 +01:00
Test Composer class
This commit is contained in:
38
tests/unit/Grav/Common/ComposerTest.php
Normal file
38
tests/unit/Grav/Common/ComposerTest.php
Normal file
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
use Codeception\Util\Fixtures;
|
||||
use Grav\Common\Composer;
|
||||
|
||||
class ComposerTest extends \Codeception\TestCase\Test
|
||||
{
|
||||
/**
|
||||
* @var \UnitTester
|
||||
*/
|
||||
protected $tester;
|
||||
|
||||
protected function _before()
|
||||
{
|
||||
}
|
||||
|
||||
protected function _after()
|
||||
{
|
||||
}
|
||||
|
||||
public function testGetComposerLocation()
|
||||
{
|
||||
$composerLocation = Composer::getComposerLocation();
|
||||
$this->assertTrue(is_string($composerLocation));
|
||||
$this->assertTrue($composerLocation[0] == '/');
|
||||
}
|
||||
|
||||
public function testGetComposerExecutor()
|
||||
{
|
||||
$composerExecutor = Composer::getComposerExecutor();
|
||||
$this->assertTrue(is_string($composerExecutor));
|
||||
$this->assertTrue($composerExecutor[0] == '/');
|
||||
$this->assertTrue(strstr($composerExecutor, 'php') !== null);
|
||||
$this->assertTrue(strstr($composerExecutor, 'composer') !== null);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user