/**
  * @dataProvider datesAndOffsets
  */
 public function testDateFromOffset($start, $offset, $expected)
 {
     $billingAgreement = new BillingAgreement();
     $newDate = $billingAgreement->dateFromOffset($start, $offset);
     $this->assertEquals($expected, $newDate);
     $this->assertNotSame($newDate, $start);
 }
 public function testGenerateOneBillingRequest()
 {
     $generator = $this->createDefaultGenerator($this->createBillingManager());
     $billingAgreement = new BillingAgreement();
     $billingAgreement->setBillingCycles(1);
     $billingAgreement->setBillingInterval('month');
     $billingAgreement->setInitialBillingDate(new \DateTime());
     $billingRequests = $generator->generate(array($billingAgreement));
     $this->assertEquals(1, count($billingRequests));
 }