Skip to content

Commit

Permalink
Refactoring Bootstrapper component for PHPunit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sanjoydesk committed Mar 14, 2017
1 parent a1f94cc commit f18ccdb
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
10 changes: 9 additions & 1 deletion src/Cygnite/Bootstrappers/Bootstrapper.php
Expand Up @@ -29,9 +29,17 @@ public final function __construct(Paths $paths)
/**
* @param array $classes
*/
public function registerBootstrappers(array $classes)
public function registerBootstrappers(array $classes, $override = false)
{
if ($override) {
$this->bootstrappers = $classes;

return $this;
}

$this->bootstrappers = array_merge($this->bootstrappers, $classes);

return $this;
}

/**
Expand Down
3 changes: 2 additions & 1 deletion src/Cygnite/Bootstrappers/Paths.php
Expand Up @@ -10,7 +10,8 @@ class Paths implements \ArrayAccess
{
private $paths = [];

/** Set all paths into object.
/**
* Set all paths into object.
* @param array $paths
*/
public function __construct(array $paths)
Expand Down

0 comments on commit f18ccdb

Please sign in to comment.