當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。