예제 #1
0
파일: StringTest.php 프로젝트: un00/dummy
 public function testApplyMultipleFilterOnEmptyString()
 {
     $string = new String('');
     $this->assertEquals('', $string->applyFilter(new VowelsFilter())->applyFilter(new ReverseFilter()));
 }
예제 #2
0
파일: script.php 프로젝트: un00/dummy
<?php

require_once './vendor/autoload.php';
use Dummy\String\Filters\VowelsFilter;
use Dummy\String\Filters\ReverseFilter;
use Dummy\String\String;
if ($argc == 1) {
    die('Usage: ' . __FILE__ . ' string string string...');
}
$input = implode(' ', array_slice($argv, 1, count($argv) - 1));
$c = new String($input);
$c->applyFilter(new ReverseFilter())->applyFilter(new VowelsFilter());
echo $c . PHP_EOL;