Add pear modules, mail and net_smtp via composer (#93)
Add pear modules, mail and net_smtp via composer, remove php 5.6 build due to phpunit 6
This commit is contained in:
43
lib/composer/vendor/consolidation/config/tests/src/ApplyConfigTestTarget.php
vendored
Normal file
43
lib/composer/vendor/consolidation/config/tests/src/ApplyConfigTestTarget.php
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
namespace Consolidation\TestUtils;
|
||||
|
||||
class ApplyConfigTestTarget
|
||||
{
|
||||
protected $dir;
|
||||
protected $value;
|
||||
|
||||
/**
|
||||
* A proper setter for the 'dir' property
|
||||
*/
|
||||
public function dir($dir)
|
||||
{
|
||||
$this->dir = $dir;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* A getter for the 'dir' property that we will use to
|
||||
* determine if the setter was called.
|
||||
*/
|
||||
public function getDir()
|
||||
{
|
||||
return $this->dir;
|
||||
}
|
||||
|
||||
/**
|
||||
* A bad setter that does not return $this.
|
||||
*/
|
||||
public function bad($value)
|
||||
{
|
||||
$this->value = $value;
|
||||
}
|
||||
|
||||
/**
|
||||
* A getter for the bad setter.
|
||||
*/
|
||||
public function getBad()
|
||||
{
|
||||
return $this->value;
|
||||
}
|
||||
}
|
||||
47
lib/composer/vendor/consolidation/config/tests/src/MyFooCommand.php
vendored
Normal file
47
lib/composer/vendor/consolidation/config/tests/src/MyFooCommand.php
vendored
Normal file
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
namespace Consolidation\TestUtils;
|
||||
|
||||
use Symfony\Component\Console\Command\Command;
|
||||
use Symfony\Component\Console\Input\InputInterface;
|
||||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
use Symfony\Component\Console\Input\InputOption;
|
||||
|
||||
class MyFooCommand extends Command
|
||||
{
|
||||
protected function configure()
|
||||
{
|
||||
$this
|
||||
->setName('my:foo')
|
||||
->setDescription('My foo command.')
|
||||
->setHelp('This command tests command option injection by echoing its options')
|
||||
->addOption(
|
||||
'other',
|
||||
null,
|
||||
InputOption::VALUE_REQUIRED,
|
||||
'Some other option',
|
||||
'fish'
|
||||
)
|
||||
->addOption(
|
||||
'name',
|
||||
null,
|
||||
InputOption::VALUE_REQUIRED,
|
||||
'What is the name of the thing we are naming',
|
||||
'George'
|
||||
)
|
||||
->addOption(
|
||||
'dir',
|
||||
null,
|
||||
InputOption::VALUE_REQUIRED,
|
||||
'What is the base directory to use for this command',
|
||||
'/default/path'
|
||||
);
|
||||
}
|
||||
|
||||
protected function execute(InputInterface $input, OutputInterface $output)
|
||||
{
|
||||
$output->writeln('Enter my:foo');
|
||||
$output->writeln('dir: ' . $input->getOption('dir'));
|
||||
$output->writeln('name: ' . $input->getOption('name'));
|
||||
$output->writeln('other: ' . $input->getOption('other'));
|
||||
}
|
||||
}
|
||||
36
lib/composer/vendor/consolidation/config/tests/src/TestLoader.php
vendored
Normal file
36
lib/composer/vendor/consolidation/config/tests/src/TestLoader.php
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
namespace Consolidation\TestUtils;
|
||||
|
||||
use Consolidation\Config\Loader\ConfigLoaderInterface;
|
||||
|
||||
class TestLoader implements ConfigLoaderInterface
|
||||
{
|
||||
protected $data;
|
||||
protected $sourceName;
|
||||
|
||||
public function set($data)
|
||||
{
|
||||
$this->data = $data;
|
||||
}
|
||||
|
||||
public function setSourceName($name)
|
||||
{
|
||||
$this->sourceName = $name;
|
||||
}
|
||||
|
||||
public function export()
|
||||
{
|
||||
return $this->data;
|
||||
}
|
||||
|
||||
public function keys()
|
||||
{
|
||||
return array_keys($this->data);
|
||||
}
|
||||
|
||||
public function getSourceName()
|
||||
{
|
||||
return $this->sourceName;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user