$this->connection->
beginTransaction();
$this->definition =
new GroupByTestDefinition();
$this->definition->
compile($this->
getContainer()->
get(DefinitionInstanceRegistry::
class));
$this->
getContainer()->
set(TestDefinition::
class,
$this->definition
);
$this->
getContainer()->
get(DefinitionInstanceRegistry::
class)->
register($this->definition
);
$this->testData =
new TestData();
$data =
[ ['id' =>
$this->testData->
create('1'
), 'name' => 'Rot L', 'field1' => 1, 'field2' => 1
],
['id' =>
$this->testData->
create('2'
), 'name' => 'Rot S', 'field1' => 1, 'field2' => 1
],
['id' =>
$this->testData->
create('3'
), 'name' => 'Grün L', 'field1' => 2, 'field2' => 1
],
['id' =>
$this->testData->
create('4'
), 'name' => 'Grün S', 'field1' => 2, 'field2' => 1
],
['id' =>
$this->testData->
create('5'
), 'name' => 'Black', 'field1' => 1, 'field2' => 2
],
['id' =>
$this->testData->
create('6'
), 'name' => 'White', 'field1' => 1, 'field2' => 2
],
];
$this->writer->
insert($this->definition,
$data, WriteContext::
createFromContext(Context::
createDefaultContext()));
}