## Part 1
# after applying patch run `composer install` command
# try installing In-Portal on PHP < 5.3.9
# confirm, that it's not possible due error on `System Requirements` step
# try installing In-Portal on PHP >= 5.3.9
# confirm, that it's possible
# create new tag (e.g. `ProcessBuilderTest` in `kMainTagProcessor` class)
# place `<inp2:m_ProcessBuilderTest/>` tag on the `index.tpl` template in `advanced` theme
# confirm, that tag result is shown when visiting Front-End
## Part 2
* place following in the tag:
```
lang=php
/** @var ProcessBuilder $process_builder */
$process_builder = $this->Application->recallObject('ProcessBuilder');
```
* confirm, that exception about `recallObject` method usage is thrown
## Part 3
* place following in the tag:
```
lang=php
/** @var ProcessBuilder $process_builder */
$process_builder = $this->Application->makeClass('ProcessBuilder');
$process = $process_builder->setCommand('ls -la')->build();
$process->mustRun();
return '<pre>' . kUtil::escape($process->getOutput(), kUtil::ESCAPE_HTML) . '</pre>';
```
# confirm, that tag output contains results from running `ls -la` command
## Part 4
* place following in the tag:
```
lang=php
/** @var ProcessBuilder $process_builder */
$process_builder = $this->Application->makeClass('ProcessBuilder');
$process = $process_builder->setExecutable('ls')->add('-la')->build();
$process->mustRun();
return '<pre>' . kUtil::escape($process->getOutput(), kUtil::ESCAPE_HTML) . '</pre>';
```
# confirm, that tag output contains results from running `ls -la` command
## Part 5
* place following in the tag:
```
lang=php
/** @var ProcessBuilder $process_builder */
$process_builder = $this->Application->makeClass('ProcessBuilder');
$process = $process_builder->setExecutable('pwd')->build();
$process->mustRun();
return '<pre>' . kUtil::escape($process->getOutput(), kUtil::ESCAPE_HTML) . '</pre>';
```
# confirm, that tag output contains current working directory (usually result of FULL_PATH constant)
## Part 6
* place following in the tag:
```
lang=php
/** @var ProcessBuilder $process_builder */
$process_builder = $this->Application->makeClass('ProcessBuilder');
$process = $process_builder->setExecutable('pwd')->setWorkingDirectory(WRITEABLE)->build();
$process->mustRun();
return '<pre>' . kUtil::escape($process->getOutput(), kUtil::ESCAPE_HTML) . '</pre>';
```
# confirm, that tag output contains WRITEABLE constant value
## Part 7
* place following in the tag:
```
lang=php
/** @var ProcessBuilder $process_builder */
$process_builder = $this->Application->makeClass('ProcessBuilder');
$process = $process_builder->setExecutable('/usr/bin/printenv')->build();
$process->mustRun();
return '<pre>' . kUtil::escape($process->getOutput(), kUtil::ESCAPE_HTML) . '</pre>';
```
# confirm, that tag output contains all environment variables of PHP process (usually seen in `$_ENV` or `$_SERVER`)
## Part 8
* place following in the tag:
```
lang=php
/** @var ProcessBuilder $process_builder */
$process_builder = $this->Application->makeClass('ProcessBuilder');
$process = $process_builder->setExecutable('/usr/bin/printenv')->setEnv('my_var', 'my_val')->build();
$process->mustRun();
return '<pre>' . kUtil::escape($process->getOutput(), kUtil::ESCAPE_HTML) . '</pre>';
```
# confirm, that tag output contains all environment variables of PHP process (usually seen in `$_ENV` or `$_SERVER`) plus the `my_var` variable