コード例 #1
0
ファイル: CommanderTest.php プロジェクト: yuzic/revert-string
 public function testGetRequest()
 {
     $request = ['name=Hello', 'world!'];
     list($action, $params) = (new App\Console\Request())->getRequest($request);
     $commander = new \App\Console\Commander();
     $command = $commander->runCommand(new \App\Helpers\String(), 'clearVowelAndRevert', $params);
     $this->assertEquals('!dlrw llH', $command);
 }
コード例 #2
0
ファイル: cli.php プロジェクト: yuzic/revert-string
#!/usr/bin/env php
<?php 
require "bootstrap.php";
$params = $_SERVER['argv'];
list($action, $params) = (new App\Console\Request())->getRequest($params);
$commander = new \App\Console\Commander();
$command = $commander->runCommand(new \App\Helpers\String(), 'clearVowelAndRevert', $params);
echo "\n{$command}\n";