forked from nowiko/AliceBundle
-
-
Notifications
You must be signed in to change notification settings - Fork 98
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Closes #44
- Loading branch information
Showing
3 changed files
with
193 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of the Hautelook\AliceBundle package. | ||
* | ||
* (c) Baldur Rensch <[email protected]> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Hautelook\AliceBundle\PhpUnit; | ||
|
||
final class FixtureStore | ||
{ | ||
/** | ||
* @var string|null The name of the Doctrine manager to use | ||
*/ | ||
private static ?string $managerName = null; | ||
|
||
/** | ||
* @var string[] The list of bundles where to look for fixtures | ||
*/ | ||
private static array $bundles = []; | ||
|
||
/** | ||
* @var bool Append fixtures instead of purging | ||
*/ | ||
private static bool $append = false; | ||
|
||
/** | ||
* @var bool Use TRUNCATE to purge | ||
*/ | ||
private static bool $purgeWithTruncate = true; | ||
|
||
/** | ||
* @var string|null The name of the Doctrine connection to use | ||
*/ | ||
private static ?string $connectionName = null; | ||
|
||
/** | ||
* @var array|null Contain loaded fixture from alice | ||
*/ | ||
private static ?array $fixtures = null; | ||
|
||
public static function getFixtures(): ?array | ||
{ | ||
return self::$fixtures; | ||
} | ||
|
||
public static function setFixtures(array $fixtures): void | ||
{ | ||
self::$fixtures = $fixtures; | ||
} | ||
|
||
public static function getManagerName(): ?string | ||
{ | ||
return self::$managerName; | ||
} | ||
|
||
public static function setManagerName(?string $managerName): void | ||
{ | ||
self::$managerName = $managerName; | ||
} | ||
|
||
public static function getBundles(): array | ||
{ | ||
return self::$bundles; | ||
} | ||
|
||
public static function setBundles(array $bundles): void | ||
{ | ||
self::$bundles = $bundles; | ||
} | ||
|
||
public static function isAppend(): bool | ||
{ | ||
return self::$append; | ||
} | ||
|
||
public static function setAppend(bool $append): void | ||
{ | ||
self::$append = $append; | ||
} | ||
|
||
public static function isPurgeWithTruncate(): bool | ||
{ | ||
return self::$purgeWithTruncate; | ||
} | ||
|
||
public static function setPurgeWithTruncate(bool $purgeWithTruncate): void | ||
{ | ||
self::$purgeWithTruncate = $purgeWithTruncate; | ||
} | ||
|
||
public static function getConnectionName(): ?string | ||
{ | ||
return self::$connectionName; | ||
} | ||
|
||
public static function setConnectionName(?string $connectionName): void | ||
{ | ||
self::$connectionName = $connectionName; | ||
} | ||
|
||
private function __construct() | ||
{ | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters