First commit
This commit is contained in:
commit
c6e2478c40
13918 changed files with 2303184 additions and 0 deletions
|
@ -0,0 +1,30 @@
|
|||
<?php
|
||||
namespace Civi\Test\CiviEnvBuilder;
|
||||
class SqlStep implements StepInterface {
|
||||
private $sql;
|
||||
|
||||
/**
|
||||
* SqlFileStep constructor.
|
||||
* @param string $sql
|
||||
*/
|
||||
public function __construct($sql) {
|
||||
$this->sql = $sql;
|
||||
}
|
||||
|
||||
|
||||
public function getSig() {
|
||||
return md5($this->sql);
|
||||
}
|
||||
|
||||
public function isValid() {
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
public function run($ctx) {
|
||||
/** @var $ctx \CiviEnvBuilder */
|
||||
if (\Civi\Test::execute($this->sql) === FALSE) {
|
||||
throw new \RuntimeException("Cannot execute: {$this->sql}");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue