/** * @param TestCommandOne $command * * @return TestCommandOne */ public static function testFirstCommand(TestCommandOne $command) { self::$firstCommandCalled = true; $aggregate = new TestAggregateRoot(); $aggregate->run(); $command->addAggregateRoot($aggregate); return $command; }
/** * @expectedException \PhpDDD\DomainDrivenDesign\Exception\BadMethodCallException */ public function testApplyWrongEvent() { $aggregate = new TestAggregateRoot(); $aggregate->testWithoutApplyMethod(); }