init
This commit is contained in:
28
vendor/codeception/base/tests/unit/Codeception/ApplicationTest.php
vendored
Normal file
28
vendor/codeception/base/tests/unit/Codeception/ApplicationTest.php
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
namespace Codeception;
|
||||
|
||||
class ApplicationTest extends \PHPUnit\Framework\TestCase
|
||||
{
|
||||
|
||||
public static function setUpBeforeClass()
|
||||
{
|
||||
require_once \Codeception\Configuration::dataDir() . 'register_command/examples/MyCustomCommand.php';
|
||||
}
|
||||
|
||||
public function testRegisterCustomCommand()
|
||||
{
|
||||
\Codeception\Configuration::append(array('extensions' => array(
|
||||
'commands' => array(
|
||||
'Project\Command\MyCustomCommand'))));
|
||||
|
||||
$application = new Application();
|
||||
$application->registerCustomCommands();
|
||||
|
||||
try {
|
||||
$application->find('myProject:myCommand');
|
||||
} catch (\Exception $e) {
|
||||
$this->fail($e->getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user