コード例 #1
0
ファイル: EventQuery.php プロジェクト: rafalwrzeszcz/zf2
 /**
  * @return string recurrence-expansion-end
  */
 public function setRecurrenceExpansionEnd($value)
 {
     if ($value != null) {
         $this->_params['recurrence-expansion-end'] = App\Util::formatTimestamp($value);
     } else {
         unset($this->_params['recurrence-expansion-end']);
     }
     return $this;
 }
コード例 #2
0
ファイル: UtilTest.php プロジェクト: bradley-holt/zf2
 public function testFindGreatestBoundedValueFailsWhenNegativelyBounded()
 {
     $data = array(-1 => null, 0 => null, 1 => null, 2 => null, 3 => null, 5 => null, -2 => null);
     try {
         $result = App\Util::findGreatestBoundedValue(-1, $data);
         $failed = true;
     } catch (App\Exception $e) {
         $failed = false;
     }
     $this->assertFalse($failed, 'Exception not raised.');
 }
コード例 #3
0
ファイル: UtilTest.php プロジェクト: robertodormepoco/zf2
 public function testFindGreatestBoundedValueFailsWhenNegativelyBounded()
 {
     $data = array(-1 => null, 0 => null, 1 => null, 2 => null, 3 => null, 5 => null, -2 => null);
     $this->setExpectedException('Zend\\GData\\app\\Exception');
     App\Util::findGreatestBoundedValue(-1, $data);
 }
コード例 #4
0
ファイル: EventQueryTest.php プロジェクト: navassouza/zf2
 public function testStartMinMaxParam()
 {
     $this->query->resetParameters();
     $startMin = '2006-10-30';
     $startMax = '2006-11-01';
     $this->query->setUser(self::GOOGLE_DEVELOPER_CALENDAR);
     $this->query->setStartMin($startMin);
     $this->query->setStartMax($startMax);
     $this->assertTrue($this->query->startMin != null);
     $this->assertTrue($this->query->startMax != null);
     $this->assertEquals(App\Util::formatTimestamp($startMin), $this->query->getStartMin());
     $this->assertEquals(App\Util::formatTimestamp($startMax), $this->query->getStartMax());
     $this->query->startMin = null;
     $this->assertFalse($this->query->startMin != null);
     $this->query->startMax = null;
     $this->assertFalse($this->query->startMax != null);
     $this->query->user = null;
     $this->assertFalse($this->query->user != null);
 }