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


PHP PHPUnit_Util_Test::getRequirements方法代码示例

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


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

示例1: testGetRequirements

 public function testGetRequirements()
 {
     $this->assertEquals(array(), PHPUnit_Util_Test::getRequirements('RequirementsTest', 'testOne'));
     $this->assertEquals(array('PHPUnit' => '1.0'), PHPUnit_Util_Test::getRequirements('RequirementsTest', 'testTwo'));
     $this->assertEquals(array('PHP' => '2.0'), PHPUnit_Util_Test::getRequirements('RequirementsTest', 'testThree'));
     $this->assertEquals(array('PHPUnit' => '2.0', 'PHP' => '1.0'), PHPUnit_Util_Test::getRequirements('RequirementsTest', 'testFour'));
 }
开发者ID:rtwo,项目名称:phpunit,代码行数:7,代码来源:TestTest.php

示例2: testGetRequirements

 public function testGetRequirements()
 {
     $this->assertEquals(array(), PHPUnit_Util_Test::getRequirements('RequirementsTest', 'testOne'));
     $this->assertEquals(array('PHPUnit' => '1.0'), PHPUnit_Util_Test::getRequirements('RequirementsTest', 'testTwo'));
     $this->assertEquals(array('PHP' => '2.0'), PHPUnit_Util_Test::getRequirements('RequirementsTest', 'testThree'));
     $this->assertEquals(array('PHPUnit' => '2.0', 'PHP' => '1.0'), PHPUnit_Util_Test::getRequirements('RequirementsTest', 'testFour'));
     $this->assertEquals(array('PHP' => '5.4.0RC6'), PHPUnit_Util_Test::getRequirements('RequirementsTest', 'testFive'));
     $this->assertEquals(array('PHP' => '5.4.0-alpha1'), PHPUnit_Util_Test::getRequirements('RequirementsTest', 'testSix'));
     $this->assertEquals(array('PHP' => '5.4.0beta2'), PHPUnit_Util_Test::getRequirements('RequirementsTest', 'testSeven'));
     $this->assertEquals(array('PHP' => '5.4-dev'), PHPUnit_Util_Test::getRequirements('RequirementsTest', 'testEight'));
 }
开发者ID:nizarbey,项目名称:phpunit-all-in-one,代码行数:11,代码来源:TestTest.php

示例3: setRequirementsFromAnnotation

 /**
  * @since Method available since Release 3.6.0
  */
 protected function setRequirementsFromAnnotation()
 {
     try {
         $requirements = PHPUnit_Util_Test::getRequirements(get_class($this), $this->name);
         if (isset($requirements['PHP'])) {
             $this->required['PHP'] = $requirements['PHP'];
         }
         if (isset($requirements['PHPUnit'])) {
             $this->required['PHPUnit'] = $requirements['PHPUnit'];
         }
         if (isset($requirements['extensions'])) {
             $this->required['extensions'] = $requirements['extensions'];
         }
         if (isset($requirements['functions'])) {
             $this->required['functions'] = $requirements['functions'];
         }
     } catch (ReflectionException $e) {
     }
 }
开发者ID:Kapitonova,项目名称:codex,代码行数:22,代码来源:TestCase.php

示例4: testGetRequirementsMergesClassAndMethodDocBlocks

 /**
  * @covers PHPUnit_Util_Test::getRequirements
  */
 public function testGetRequirementsMergesClassAndMethodDocBlocks()
 {
     $expectedAnnotations = array('PHP' => '5.4', 'PHPUnit' => '3.7', 'OS' => '/WINNT/i', 'functions' => array('testFuncClass', 'testFuncMethod'), 'extensions' => array('testExtClass', 'testExtMethod'));
     $this->assertEquals($expectedAnnotations, PHPUnit_Util_Test::getRequirements('RequirementsClassDocBlockTest', 'testMethod'));
 }
开发者ID:scrobot,项目名称:Lumen,代码行数:8,代码来源:TestTest.php


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