public function testTransformeタブ数指定()
 {
     $testData = "<?php\n/**\n * テストサンプル\n */\nfunction helloWorld() {\n\techo \"Hello World!\"\n}";
     $result = "<?php\n/**\n * テストサンプル\n */\nfunction helloWorld() {\n       echo \"Hello World!\"\n}";
     $remover = new TabToSpaces();
     $remover->setSpace(7);
     $this->assertEquals($result, $remover->transform($testData));
 }
Exemple #2
0
 function registerTabToSpace($options)
 {
     if ($options['tab']) {
         $tabToSpace = new TabToSpaces();
         $tabToSpace->setSpace($options['tab']);
         $this->box->push($tabToSpace);
     }
 }