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