Skip to content

Commit

Permalink
Codeception#1634 - Typo fix and stringising cleanup action
Browse files Browse the repository at this point in the history
Stringises a cleanup action so that it appears better on console.
Also fixes a typo namespace error.
  • Loading branch information
codemedic committed Jan 12, 2015
1 parent 63e5b9a commit 371167a
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/Codeception/Util/SQL/CleanupAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
namespace Codeception\Util\SQL;

use Codeception\Exception\TestRuntime as TestRuntimeException;
use Redmatter\Codeception\Common\Module\MultiDb;
use Codeception\Module\MultiDb;

/**
* Class CleanupAction
Expand Down Expand Up @@ -90,6 +90,16 @@ public function __invoke(MultiDb $multi_db)
return call_user_func_array(array($multi_db, self::getMultiDbMethod($this->type)), $this->definition);
}

/**
* Stringising the action so that the console output will look nicer.
*
* @return string
*/
public function __toString()
{
return "cleanup on '{$this->connector}' connector {$this->type} ".json_encode($this->definition);
}

/**
* Creates CleanupAction for insert
*
Expand Down

0 comments on commit 371167a

Please sign in to comment.