예제 #1
0
 /**
  * @test if Planning class provides a correct array
  * @dataProvider dateTimeProvider
  */
 public function isProvidingArrayCopyOk($id, $dateTimeString)
 {
     $planning = new Planning();
     $planning->setId($id);
     $planning->setDate(new \DateTime($dateTimeString));
     $arrayCopy = $planning->getArrayCopy();
     $this->assertEquals(['id' => $id, 'date' => $dateTimeString], $arrayCopy);
 }
 /**
  * Entity manager mock returned values for 'find()' method
  * @return array
  */
 public function getEntityMap()
 {
     $testPlanning = new Planning();
     $testPlanning->setId(1);
     $testPlanning->setDate(new \DateTime('2015-12-25 00:00:00+02:02'));
     $testBatch = new Batch();
     $testBatch->setId(2);
     $testBatch->setStartTime(new \DateTime('2015-12-25 00:00:00+02:02'));
     return [['Application\\Model\\Planning\\Planning', '1', null, null, $testPlanning], ['Application\\Model\\Planning\\Batch', '1', null, null, $testBatch]];
 }