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


PHP PHPUnit_Framework_TestCase::markTestSkipped方法代码示例

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


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

示例1: init

 private function init()
 {
     if (!class_exists('PDO') || !in_array('sqlite', \PDO::getAvailableDrivers())) {
         \PHPUnit_Framework_TestCase::markTestSkipped('This test requires SQLite support in your environment');
     }
     $config = new \Doctrine\ORM\Configuration();
     $config->setEntityNamespaces(array('UebbHateoasBundle' => 'uebb\\HateoasBundle\\Tests\\Entity'));
     $config->setAutoGenerateProxyClasses(true);
     $config->setProxyDir(\sys_get_temp_dir());
     $config->setProxyNamespace('UebbHateoasTests\\Doctrine');
     $reader = new AnnotationReader();
     $metadataDriver = new AnnotationDriver($reader, 'uebb\\HateoasBundle\\Tests\\Entity');
     $config->setMetadataDriverImpl($metadataDriver);
     $config->setQueryCacheImpl(new \Doctrine\Common\Cache\ArrayCache());
     $config->setMetadataCacheImpl(new \Doctrine\Common\Cache\ArrayCache());
     $params = array('driver' => 'pdo_sqlite', 'memory' => true);
     $this->entityManager = EntityManager::create($params, $config);
     $this->linkParser = $this->getMock('uebb\\HateoasBundle\\Service\\LinkParserInterface');
     $this->linkResolver = $this->getMock('uebb\\HateoasBundle\\Service\\LinkResolverInterface');
     $this->dispatcher = $this->getMock('Symfony\\Component\\EventDispatcher\\EventDispatcherInterface');
     $this->formResolver = new FormResolver($this->factory, $reader);
     $this->queryParser = $this->getMock('uebb\\HateoasBundle\\Service\\QueryParserInterface');
     $this->serializer = $this->getMock('JMS\\Serializer\\SerializerInterface');
     $this->validator = $this->getMock('Symfony\\Component\\Validator\\Validator\\ValidatorInterface');
     $this->requestProcessor = new RequestProcessor($this->entityManager, $this->linkParser, $this->linkResolver, $this->formResolver, $this->dispatcher, $this->queryParser, $this->serializer, $this->validator);
 }
开发者ID:uebb,项目名称:hateoas-bundle,代码行数:26,代码来源:RequestProcessorTest.php

示例2: loadConfig

 protected function loadConfig()
 {
     @(include $this->filename);
     if (!isset($GLOBALS['Blorgy_FunctionalTest_Config']) || !is_array($GLOBALS['Blorgy_FunctionalTest_Config'])) {
         $this->test->markTestSkipped('Functional test configuration is missing.');
     }
     $config = $GLOBALS['Blorgy_FunctionalTest_Config'];
     if (!isset($config['working_dir']) || !isset($config['instance']) || !isset($config['base_href'])) {
         $this->test->markTestSkipped('Functional test configuration is missing or incorrect.');
     }
     $this->instance = $config['instance'];
     if (strpos($config['base_href'], '%s') === false) {
         $this->base_href = $config['base_href'];
     } else {
         $this->base_href = sprintf($config['base_href'], $config['instance'], $config['working_dir']);
     }
 }
开发者ID:nburka,项目名称:blorgy,代码行数:17,代码来源:TestConfig.php

示例3: __construct

 /**
  * Registers vfsStream
  *
  * @param PHPUnit_Framework_TestCase $testCase
  *
  * @return vfsStreamHelper_Wrapper
  */
 public function __construct(PHPUnit_Framework_TestCase $testCase, $mountPoint = 'root')
 {
     @(include_once 'vfsStream/vfsStream.php');
     if (!class_exists('vfsStreamWrapper')) {
         $testCase->markTestSkipped('vfsStream is not available - skipping');
     } else {
         vfsStream::setup($mountPoint);
     }
 }
开发者ID:proofek,项目名称:vfsStreamHelper,代码行数:16,代码来源:Wrapper.php

示例4: createTestEntityManager

 /**
  * Returns an entity manager for testing.
  *
  * @param Configuration|null $config
  *
  * @return EntityManager
  */
 public static function createTestEntityManager(Configuration $config = null)
 {
     if (!extension_loaded('pdo_sqlite')) {
         \PHPUnit_Framework_TestCase::markTestSkipped('Extension pdo_sqlite is required.');
     }
     if (null === $config) {
         $config = self::createTestConfiguration();
     }
     $params = array('driver' => 'pdo_sqlite', 'memory' => true);
     return EntityManager::create($params, $config);
 }
开发者ID:yceruto,项目名称:symfony,代码行数:18,代码来源:DoctrineTestHelper.php

示例5: createTestEntityManager

 /**
  * Returns an entity manager for testing.
  *
  * @return EntityManager
  */
 public static function createTestEntityManager()
 {
     if (!extension_loaded('pdo_sqlite')) {
         \PHPUnit_Framework_TestCase::markTestSkipped('Extension pdo_sqlite is required.');
     }
     $config = new \Doctrine\ORM\Configuration();
     $config->setEntityNamespaces(array('SymfonyTestsDoctrine' => 'Symfony\\Bridge\\Doctrine\\Tests\\Fixtures'));
     $config->setAutoGenerateProxyClasses(true);
     $config->setProxyDir(\sys_get_temp_dir());
     $config->setProxyNamespace('SymfonyTests\\Doctrine');
     $config->setMetadataDriverImpl(new AnnotationDriver(new AnnotationReader()));
     $config->setQueryCacheImpl(new \Doctrine\Common\Cache\ArrayCache());
     $config->setMetadataCacheImpl(new \Doctrine\Common\Cache\ArrayCache());
     $params = array('driver' => 'pdo_sqlite', 'memory' => true);
     return EntityManager::create($params, $config);
 }
开发者ID:Ener-Getick,项目名称:symfony,代码行数:21,代码来源:DoctrineTestHelper.php

示例6: createTestEntityManager

 /**
  * Returns an entity manager for testing.
  *
  * @return EntityManager
  */
 public static function createTestEntityManager()
 {
     if (!class_exists('PDO') || !in_array('sqlite', \PDO::getAvailableDrivers())) {
         \PHPUnit_Framework_TestCase::markTestSkipped('This test requires SQLite support in your environment');
     }
     $config = new \Doctrine\ORM\Configuration();
     $config->setEntityNamespaces(array('SymfonyTestsDoctrine' => 'Symfony\\Bridge\\Doctrine\\Tests\\Fixtures'));
     $config->setAutoGenerateProxyClasses(true);
     $config->setProxyDir(\sys_get_temp_dir());
     $config->setProxyNamespace('SymfonyTests\\Doctrine');
     $config->setMetadataDriverImpl(new AnnotationDriver(new AnnotationReader()));
     $config->setQueryCacheImpl(new \Doctrine\Common\Cache\ArrayCache());
     $config->setMetadataCacheImpl(new \Doctrine\Common\Cache\ArrayCache());
     $params = array('driver' => 'pdo_sqlite', 'memory' => true);
     return EntityManager::create($params, $config);
 }
开发者ID:anhnt36,项目名称:admin_Si,代码行数:21,代码来源:DoctrineTestHelper.php

示例7: processResults

 /**
  * Analyze results of aggregated tests execution and complete test case appropriately
  *
  * @param array $results
  * @param int $passed
  * @return void
  */
 protected function processResults(array $results, $passed)
 {
     $totalCountsMessage = sprintf('Passed: %d, Failed: %d, Incomplete: %d, Skipped: %d.', $passed, count($results['PHPUnit_Framework_AssertionFailedError']), count($results['PHPUnit_Framework_IncompleteTestError']), count($results['PHPUnit_Framework_SkippedTestError']));
     if ($results['PHPUnit_Framework_AssertionFailedError']) {
         $this->_testCase->fail($totalCountsMessage . PHP_EOL . implode(PHP_EOL, $results['PHPUnit_Framework_AssertionFailedError']));
     }
     if (!$results['PHPUnit_Framework_IncompleteTestError'] && !$results['PHPUnit_Framework_SkippedTestError']) {
         return;
     }
     $message = $totalCountsMessage . PHP_EOL . implode(PHP_EOL, $results['PHPUnit_Framework_IncompleteTestError']) . PHP_EOL . implode(PHP_EOL, $results['PHPUnit_Framework_SkippedTestError']);
     if ($results['PHPUnit_Framework_IncompleteTestError']) {
         $this->_testCase->markTestIncomplete($message);
     } elseif ($results['PHPUnit_Framework_SkippedTestError']) {
         $this->_testCase->markTestSkipped($message);
     }
 }
开发者ID:pradeep-wagento,项目名称:magento2,代码行数:23,代码来源:AggregateInvoker.php

示例8: loadConfig

 protected function loadConfig()
 {
     @(include $this->filename);
     if (!isset($GLOBALS['FunctionalTest_Config']) || !is_array($GLOBALS['FunctionalTest_Config'])) {
         $this->test->markTestSkipped('Functional test configuration is missing.');
     }
     $config = $GLOBALS['FunctionalTest_Config'];
     if (!isset($config['working_dir']) || !isset($config['base_href'])) {
         $this->test->markTestSkipped('Functional test configuration is missing or incorrect.');
     }
     if (isset($config['instance'])) {
         $this->instance = $config['instance'];
     }
     if (isset($config['domain'])) {
         $this->domain = $config['domain'];
     }
     if (strpos($config['base_href'], '%s') === false) {
         $this->base_href = $config['base_href'];
     } elseif ($this->instance == '') {
         $this->base_href = sprintf($config['base_href'], $config['working_dir']);
     } else {
         $this->base_href = sprintf($config['base_href'], $this->instance, $config['working_dir']);
     }
     if (isset($config['screenshot_path'])) {
         $this->screenshot_path = $config['screenshot_path'];
     }
     if (isset($config['screenshot_url'])) {
         $this->screenshot_url = $config['screenshot_url'];
     }
     if (isset($config['selenium_host'])) {
         $this->selenium_host = $config['selenium_host'];
     }
     if (isset($config['selenium_port'])) {
         $this->selenium_port = (int) $config['selenium_port'];
     }
 }
开发者ID:GervaisdeM,项目名称:turing,代码行数:36,代码来源:TuringTestConfig.php

示例9: skip

 /**
  * http://www.phpunit.de/manual/current/en/incomplete-and-skipped-tests.html
  *
  * @see lime_test#skip()
  *
  * @param string $message
  * @param int $nb_tests
  */
 public function skip($message = '', $nb_tests = 1)
 {
     $this->testCase->markTestSkipped($message . ($message ? ', ' : '') . 'nb_tests: ' . $nb_tests);
 }
开发者ID:nvidela,项目名称:kimkelen,代码行数:12,代码来源:sfPHPUnitTest.class.php

示例10: require64Bit

 /**
  * Skips the test unless the current system has a 64bit architecture.
  */
 public static function require64Bit(\PHPUnit_Framework_TestCase $testCase)
 {
     if (8 !== PHP_INT_SIZE) {
         $testCase->markTestSkipped('PHP 64 bit is required.');
     }
 }
开发者ID:yceruto,项目名称:symfony,代码行数:9,代码来源:IntlTestHelper.php

示例11: markTestSkipped

 /**
  * Mark this test as skipped. Puts extra information in the logs.
  *
  * @param string $message
  */
 public static function markTestSkipped($message = '')
 {
     $backtrace = wfDebugBacktrace(3);
     $entry = $backtrace[1];
     Wikia::log(wfFormatStackFrame($entry), false, "marked as skipped - {$message}");
     parent::markTestSkipped($message);
 }
开发者ID:Tjorriemorrie,项目名称:app,代码行数:12,代码来源:WikiaBaseTest.class.php

示例12: markTestSkipped

 public static function markTestSkipped($message = '')
 {
     Wikia::log(__METHOD__, '', $message);
     parent::markTestSkipped($message);
 }
开发者ID:schwarer2006,项目名称:wikia,代码行数:5,代码来源:WikiaBaseTest.class.php

示例13: requiredBy

 /**
  *
  */
 public static function requiredBy(PHPUnit_Framework_TestCase $Case)
 {
     if (!Runkit::isEnabled()) {
         $Case->markTestSkipped('Runkit must be enabled');
     }
 }
开发者ID:v-technologies,项目名称:transformist,代码行数:9,代码来源:Runkit.php

示例14: assertPhpUnit

 /**
  * Profiles the callback and test the result against the given configuration.
  */
 public function assertPhpUnit(\PHPUnit_Framework_TestCase $testCase, Profile\Configuration $config, $callback)
 {
     if (!$config->hasMetadata('skip_timeline')) {
         $config->setMetadata('skip_timeline', 'true');
     }
     try {
         $probe = $this->createProbe($config);
         $callback();
         $profile = $this->endProbe($probe);
         $testCase->assertThat($profile, new BlackfireConstraint());
     } catch (Exception\ExceptionInterface $e) {
         $testCase->markTestSkipped($e->getMessage());
     }
     return $profile;
 }
开发者ID:stof,项目名称:php-sdk,代码行数:18,代码来源:Client.php


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