Exemplo n.º 1
0
 /**
  * @dataProvider validMultiLineCommandsProvider
  **/
 public function testCommandsAreNormalisedToASingleLine($input, $expected)
 {
     $turtle = new Turtle($input);
     $this->assertFalse(strpos("\n", $turtle->getNormalisedTokens()), 'Normalised string should not contain any newlines.');
 }
Exemplo n.º 2
0
        
            <? if ($error): ?>
                <div class="turtle-error">
                    <h2>The Errors:</h2>
                    <p><?php 
echo $error;
?>
</p>
                </div>
            <? else: ?>

                <div class="turtle-output">
                    <h2>The Output:</h2>
                    <p>
                        <img src="image.php?commands=<?php 
echo urlencode($turtle->getNormalisedTokens());
?>
">
                    </p>
                </div>
                
                <div class="turtle-normalised">
                    <h2>The Normalised Commands:</h2>
                    <p><?php 
echo $turtle->getNormalisedTokens();
?>
</p>
                </div>

            <? endif; ?>
        </div>