public function testGenerateIdentifier() { $art = new AuthorType(); $firstname_attribute = $art->getAttribute('firstname'); // e.g. foo/bar/baz/95/8884e486-aa2f-4f91-a45f-f5f0e1c65c38 $id = FilesystemService::generatePath($firstname_attribute); $expected_prefix = 'honeybee_cmf.aggregate_fixtures.author/firstname/'; $this->assertStringStartsWith($expected_prefix, $id); $this->assertStringMatchesFormat($expected_prefix . '%x/%x-%x-%x-%x-%x', $id); }
/** * @expectedException Honeybee\Common\Error\RuntimeError */ public function testAggregateRootCreationWithState() { $aggregate_root_type = new AuthorType(); $aggregate_root = $aggregate_root_type->createEntity(['invalid' => 'state']); }
public function setUp() { $author_aggregate_root_type = new AuthorType(); $this->aggregate_root_type_map = new AggregateRootTypeMap([$author_aggregate_root_type->getPrefix() => $author_aggregate_root_type]); }
public function testAggregateRootTypeStateMachineNameResolvingWorks() { $author_type = new AuthorType(); $this->assertEquals('honeybee_cmf.aggregate_fixtures.author', $author_type->getPrefix()); $this->assertEquals('honeybee_cmf.aggregate_fixtures.author.default_workflow', $this->getDefaultWorkflowService()->resolveStateMachineName($author_type)); }