PHP code example of fonsecas72 / behat-failurehook-extension
1. Go to this page and download the library: Download fonsecas72/behat-failurehook-extension library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
fonsecas72 / behat-failurehook-extension example snippets
namespace Features\FailureHooks;
class MySQLDumpExpound extends \Fonsecas72\FailureExpoExtension\Expounds\Expound
{
public function expose()
{
$fs = new \Symfony\Component\Filesystem\Filesystem();
$destination = 'build/'.$this->description;
$fs->mkdir($destination);
shell_exec('mysqldump -uuser -ppass db > '.$destination.'/dbdump.sql');
echo PHP_EOL.'| MysqlDump captured ~> '.$destination.'/dbdump.sql';
}
}