当前位置: 首页>>代码示例>>PHP>>正文


PHP Shell::isPerlAvailable方法代码示例

本文整理汇总了PHP中Shell::isPerlAvailable方法的典型用法代码示例。如果您正苦于以下问题:PHP Shell::isPerlAvailable方法的具体用法?PHP Shell::isPerlAvailable怎么用?PHP Shell::isPerlAvailable使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Shell的用法示例。


在下文中一共展示了Shell::isPerlAvailable方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getServerDataFieldset

 /**
  * Get fieldset for server data
  * @return \FormularFieldset
  */
 private function getServerDataFieldset()
 {
     $Fieldset = new FormularFieldset(__('Server information'));
     $Fieldset->addSmallInfo(__('PHP version:') . ' ' . PHP_VERSION);
     $Fieldset->addSmallInfo(__('MySQL version:') . ' ' . DB::getInstance()->getAttribute(PDO::ATTR_SERVER_VERSION));
     $Fieldset->addSmallInfo(__('Time limit:') . ' ' . ini_get('max_execution_time'));
     $Fieldset->addSmallInfo(__('Memory limit:') . ' ' . ini_get('memory_limit'));
     $Fieldset->addSmallInfo(__('Upload limit:') . ' ' . ini_get('upload_max_filesize'));
     $Fieldset->addSmallInfo(__('Post limit:') . ' ' . ini_get('post_max_size'));
     if (Shell::isPerlAvailable()) {
         $Fieldset->addSmallInfo(__('Perl scripts can be used.'));
     } else {
         $Fieldset->addWarning(__('Perl scripts cannot be used.'));
     }
     $Fieldset->setCollapsed();
     return $Fieldset;
 }
开发者ID:rob-st,项目名称:Runalyze,代码行数:21,代码来源:class.AdminView.php

示例2: testHRV

 public function testHRV()
 {
     if (Shell::isPerlAvailable()) {
         $this->object->parseFile('../tests/testfiles/fit/HRV-example.fit');
         $this->assertFalse($this->object->hasMultipleTrainings());
         $this->assertFalse($this->object->failed());
         $this->assertTrue($this->object->object()->hasArrayHRV());
     }
 }
开发者ID:n0rthface,项目名称:Runalyze,代码行数:9,代码来源:ImporterFiletypeFITTest.php

示例3: testMultisportTriathlonFromFenix3

 public function testMultisportTriathlonFromFenix3()
 {
     if (Shell::isPerlAvailable()) {
         $this->object->parseFile('../tests/testfiles/fit/multisport-triathlon-fenix3.fit');
         $this->assertFalse($this->object->failed());
         $this->assertTrue($this->object->hasMultipleTrainings());
         $this->assertEquals(5, $this->object->numberOfTrainings());
         $Swimming = $this->object->object(0);
         $this->assertEquals('09.08.2015 09:13:03', date('d.m.Y H:i:s', $Swimming->getTimestamp()));
         $this->assertEquals(1.526, $Swimming->getDistance());
         $this->assertEquals(2033, $Swimming->getTimeInSeconds());
         $this->assertTrue($Swimming->hasArrayDistance());
         $this->assertTrue($Swimming->hasArrayCadence());
         $this->assertFalse($Swimming->hasArrayHeartrate());
         $this->assertTrue($Swimming->hasArrayAltitude());
         $this->assertFalse($Swimming->hasArrayVerticalOscillation());
         $this->assertFalse($Swimming->hasArrayGroundContact());
         $Transition1 = $this->object->object(1);
         $this->assertEquals('09.08.2015 09:48:47', date('d.m.Y H:i:s', $Transition1->getTimestamp()));
         $this->assertEquals(0.367, $Transition1->getDistance());
         $this->assertEquals(165, $Transition1->getTimeInSeconds());
         $Cycling = $this->object->object(2);
         $this->assertEquals('09.08.2015 09:51:35', date('d.m.Y H:i:s', $Cycling->getTimestamp()));
         $this->assertEquals(40.261, $Cycling->getDistance());
         $this->assertEquals(4455, $Cycling->getTimeInSeconds());
         $this->assertTrue($Cycling->hasArrayDistance());
         $this->assertFalse($Cycling->hasArrayCadence());
         $this->assertTrue($Cycling->hasArrayHeartrate());
         $this->assertTrue($Cycling->hasArrayAltitude());
         $this->assertFalse($Cycling->hasArrayVerticalOscillation());
         $this->assertFalse($Cycling->hasArrayGroundContact());
         $Transition2 = $this->object->object(3);
         $this->assertEquals('09.08.2015 11:05:48', date('d.m.Y H:i:s', $Transition2->getTimestamp()));
         $this->assertEquals(0.419, $Transition2->getDistance());
         $this->assertEquals(109, $Transition2->getTimeInSeconds());
         $Running = $this->object->object(4);
         $this->assertEquals('09.08.2015 11:07:41', date('d.m.Y H:i:s', $Running->getTimestamp()));
         $this->assertEquals(9.317, $Running->getDistance());
         $this->assertEquals(2381, $Running->getTimeInSeconds());
         $this->assertTrue($Running->hasArrayDistance());
         $this->assertTrue($Running->hasArrayCadence());
         $this->assertTrue($Running->hasArrayHeartrate());
         $this->assertTrue($Running->hasArrayAltitude());
         $this->assertTrue($Running->hasArrayVerticalOscillation());
         $this->assertTrue($Running->hasArrayGroundContact());
     }
 }
开发者ID:9x,项目名称:Runalyze,代码行数:47,代码来源:ImporterFiletypeFITTest.php

示例4: testOsynceTimeProblem

 public function testOsynceTimeProblem()
 {
     if (Shell::isPerlAvailable()) {
         $this->object->parseFile('../tests/testfiles/fit/osynce-stop-bug.fit');
         $this->assertFalse($this->object->hasMultipleTrainings());
         $this->assertFalse($this->object->failed());
         $this->assertEquals('osynce', $this->object->object()->getCreator());
         $this->assertEquals(47 * 60 + 6, $this->object->object()->getTimeInSeconds());
         $this->assertEquals(47 * 60 + 6, $this->object->object()->getArrayTimeLastPoint());
         $this->assertEquals(15.5, $this->object->object()->getDistance(), '', 0.1);
         $this->assertTrue($this->object->object()->hasArrayTime());
         $this->assertTrue($this->object->object()->hasArrayDistance());
         $this->assertTrue($this->object->object()->hasArrayAltitude());
         $this->assertTrue($this->object->object()->hasArrayHeartrate());
         $this->assertTrue($this->object->object()->hasArrayCadence());
         $this->assertTrue($this->object->object()->hasArrayTemperature());
         $this->assertTrue($this->object->object()->hasArrayPower());
         $timeArray = $this->object->object()->getArrayTime();
         $num = count($timeArray);
         for ($i = 2; $i < $num; ++$i) {
             if ($timeArray[$i] < $timeArray[$i - 1]) {
                 $this->assertTrue(false, sprintf('Time array is not continuously increasing: %u < %u at index %u', $timeArray[$i], $timeArray[$i - 1], $i));
                 break;
             }
         }
     }
 }
开发者ID:Nugman,项目名称:Runalyze,代码行数:27,代码来源:ImporterFiletypeFITTest.php


注:本文中的Shell::isPerlAvailable方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。