public function testCanResolveTheSameServiceContainerObject() { $container1 = new Container(); $container2 = $container1->make('alexlvcom\\ServiceContainer\\Container'); $container3 = $this->containerMock->make('alexlvcom\\ServiceContainer\\Container'); $container4 = $this->containerMock->make('alexlvcom\\ServiceContainer\\Container'); $this->assertTrue($container1 === $container2, 'Container objects are not equal (first container object created natively)'); $this->assertTrue($container3 === $container4, 'Container objects are not equal (each container created through container)'); }
* First release * */ error_reporting(E_ALL); ini_set('display_errors', 1); require_once __DIR__ . '/vendor/autoload.php'; define('ALEXLVCOM_TASK_RUNNER_VERSION', '0.0.2'); define('TASK_PATH', __DIR__ . '/app/tasks'); define('TASK_LOG_PATH', __DIR__ . '/app/logs'); define('ROOTPATH', __DIR__ . '/'); use League\CLImate\CLImate; use alexlvcom\TaskRunner\CommandContext; use alexlvcom\TaskRunner\ParamValidator; use alexlvcom\ServiceContainer\Container as ServiceContainer; $climate = new CLImate(); $container = new ServiceContainer(); $climate->out('<green>Task Runner by AlexLV. (c) 2015 .</green> <white>Version <yellow>' . ALEXLVCOM_TASK_RUNNER_VERSION . '</yellow>'); $climate->br(); $climate->arguments->add(['name' => ['longPrefix' => 'name', 'description' => 'Task Name', 'required' => true]]); try { $climate->arguments->parse(); } catch (Exception $e) { $climate->error($e->getMessage())->br()->usage(); $climate->br(); exit; } if ($climate->arguments->defined('name') === false || $climate->arguments->get('name') === '') { $climate->usage(); exit; } $time_start = microtime(true);