Skip to content

Commit

Permalink
Changed format of integration tests data fixtures into Yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
alongosz committed Mar 27, 2020
1 parent 25dccae commit ab1c973
Show file tree
Hide file tree
Showing 2 changed files with 904 additions and 1 deletion.
4 changes: 3 additions & 1 deletion eZ/Publish/API/Repository/Tests/SetupFactory/Legacy.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
use eZ\Publish\Core\Repository\Values\User\UserReference;
use Symfony\Component\Filesystem\Filesystem;
use eZ\Publish\Core\Base\Container\Compiler;
use Symfony\Component\Yaml\Yaml;

/**
* A Test Factory is used to setup the infrastructure for a tests, based on a
Expand Down Expand Up @@ -305,7 +306,8 @@ protected function getPostInsertStatements()
protected function getInitialData()
{
if (!isset(self::$initialData)) {
self::$initialData = include __DIR__ . '/../../../../Core/Repository/Tests/Service/Integration/Legacy/_fixtures/test_data.php';
$testDataFilePath = __DIR__ . '/../_fixtures/Legacy/data/test_data.yaml';
self::$initialData = Yaml::parseFile($testDataFilePath);
}

return self::$initialData;
Expand Down
Loading

0 comments on commit ab1c973

Please sign in to comment.