Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Sets the value of an environment variable
<?php putenv(string $assignment): bool
<?php public function width(int $value): self
{
putenv('COLUMNS=' . $value);
return $this;
}
<?php public function height(int $value): self
{
putenv('ROWS=' . $value);
return $this;
}
<?php beforeEach(function() {
setTheme(new DivTestTheme());
putenv('COLUMNS=20');
});
test('test set and get theme', function (): void {
<?php });
test('test m', function (): void {
putenv('COLUMNS=40');
$value = div()->value('RAD')->m(0, 10, 0, 10)->renderToString();
expect($value)->toBe(terminal()->getCsi() . "0mยงยงยงยงยงยงยงยงยงยงRADยงยงยงยงยงยงยงยงยงยงยงยงยงยงยงยงยง" . PHP_EOL);
<?php });
test('test my', function (): void {
putenv('COLUMNS=40');
$value = div()->value('RAD')->my(2)->renderToString();
expect($value)->toBe(PHP_EOL . PHP_EOL . terminal()->getCsi() . "0mRADยงยงยงยงยงยงยงยงยงยงยงยงยงยงยงยงยงยงยงยงยงยงยงยงยงยงยงยงยงยงยงยงยงยงยงยงยง" . PHP_EOL . PHP_EOL . PHP_EOL);
<?php });
test('test magic my', function (): void {
putenv('COLUMNS=40');
$value = div()->value('RAD')->my2()->renderToString();
<?php });
test('test mx', function (): void {
putenv('COLUMNS=40');
$value = div()->value('RAD')->mx(10)->renderToString();
expect($value)->toBe(terminal()->getCsi() . "0mยงยงยงยงยงยงยงยงยงยงRADยงยงยงยงยงยงยงยงยงยงยงยงยงยงยงยงยง" . PHP_EOL);
<?php });
test('test magic mx', function (): void {
putenv('COLUMNS=40');
$value = div()->value('RAD')->mx10()->renderToString();
expect($value)->toBe(terminal()->getCsi() . "0mยงยงยงยงยงยงยงยงยงยงRADยงยงยงยงยงยงยงยงยงยงยงยงยงยงยงยงยง" . PHP_EOL);
<?php });
test('test mt', function (): void {
putenv('COLUMNS=40');
$value = div()->value('RAD')->mt2()->renderToString();
$toBe = PHP_EOL .
<?php });
test('test magic mt', function (): void {
putenv('COLUMNS=40');
$value = div()->value('RAD')->mt2()->renderToString();
$toBe = PHP_EOL .
<?php });
test('test py', function (): void {
putenv('COLUMNS=40');
$value = div()->value('RAD')->py(2)->renderToString();
$toBe = terminal()->getCsi() . "0mยงยงยงยงยงยงยงยงยงยงยงยงยงยงยงยงยงยงยงยงยงยงยงยงยงยงยงยงยงยงยงยงยงยงยงยงยงยงยงยง" . terminal()->getCsi() . "0m" . PHP_EOL .
<?php });
test('test magic py', function (): void {
putenv('COLUMNS=40');
$value = div()->value('RAD')->py2()->renderToString();
<?php });
test('test pt', function (): void {
putenv('COLUMNS=40');
$value = div()->value('RAD')->pt2()->renderToString();
$toBe = terminal()->getCsi() . "0mยงยงยงยงยงยงยงยงยงยงยงยงยงยงยงยงยงยงยงยงยงยงยงยงยงยงยงยงยงยงยงยงยงยงยงยงยงยงยงยง" . terminal()->getCsi() . "0m" . PHP_EOL .
<?php });
test('test magic pt', function (): void {
putenv('COLUMNS=40');
$value = div()->value('RAD')->pt2()->renderToString();
$toBe = terminal()->getCsi() . "0mยงยงยงยงยงยงยงยงยงยงยงยงยงยงยงยงยงยงยงยงยงยงยงยงยงยงยงยงยงยงยงยงยงยงยงยงยงยงยงยง" . terminal()->getCsi() . "0m" . PHP_EOL .
<?php use function Thermage\heading;
beforeEach(function() {
putenv('COLUMNS=20');
});
test('test heading size < 1', function (): void {