/**
  * (non-PHPdoc)
  * @see sfPHPUnitTestCase::setUp()
  */
 public function setUp()
 {
     parent::setUp();
     $this->_user = $this->helper->makeUser();
     $this->_ymlFileName = sys_get_temp_dir() . '/php_' . __CLASS__ . '.yml';
     touch($this->_ymlFileName);
 }
 /**
  * Выборка операций за период
  */
 public function testFillForPeriod()
 {
     $dateStart = new DateTime(date('Y-m-01'));
     $dateEnd = date_add(clone $dateStart, new DateInterval('P1M'));
     $op = $this->helper->makeOperation();
     $operationCollection = new OperationCollection($op->getUser());
     $operationCollection->setPeriodStartDate($dateStart)->setPeriodEndDate($dateEnd)->fill();
     $this->assertNotEquals(0, count($operationCollection->getOperations()));
 }
 /**
  * (non-PHPdoc)
  * @see sfPHPUnitTestCase::setUp()
  */
 public function setUp()
 {
     parent::setUp();
     $this->_user = $this->helper->makeUser();
     $account = $this->helper->makeAccount($this->_user);
     // Создаём две финцели в категории 1
     $this->helper->makeTarget($account, array('category_id' => '1', 'visible' => '1', 'done' => '1'));
     $this->helper->makeTarget($account, array('category_id' => '1', 'visible' => '1', 'done' => '1'));
     // и одну финцель в категории 2
     $this->helper->makeTarget($account, array('category_id' => '2', 'visible' => '1', 'done' => '0'));
 }