Beispiel #1
0
 public function testBorders()
 {
     $testString = 'hello';
     $expectedString1 = 'hello' . PHP_EOL . '-----' . PHP_EOL;
     $expectedString2 = 'hello' . PHP_EOL . '=====' . PHP_EOL;
     $this->string(Vivian\Tools::underlineBorder($testString))->isEqualTo($expectedString1)->string(Vivian\Tools::doubleUnderlineBorder($testString))->isEqualTo($expectedString2);
     $testString = 'Not a test';
     $expectedString1 = '+------------+' . PHP_EOL . '| Not a test |' . PHP_EOL . '+------------+' . PHP_EOL;
     $expectedString2 = '*============*' . PHP_EOL . '# Not a test #' . PHP_EOL . '*============*' . PHP_EOL;
     $this->string(Vivian\Tools::border($testString))->isEqualTo($expectedString1)->string(Vivian\Tools::doubleBorder($testString))->isEqualTo($expectedString2);
 }
Beispiel #2
0
#!/usr/bin/env php
<?php 
$autoloadFile = __DIR__ . '/../../vendor/autoload.php';
require $autoloadFile;
use Matks\Vivian\Tools;
echo Tools::doubleBorder('Big border');
echo Tools::border('Cool !');
echo Tools::underlineBorder('Great !');
echo Tools::doubleUnderlineBorder('Awesome !');
echo PHP_EOL;