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


PHP PHPUnit_Framework_Error_Notice类代码示例

本文整理汇总了PHP中PHPUnit_Framework_Error_Notice的典型用法代码示例。如果您正苦于以下问题:PHP PHPUnit_Framework_Error_Notice类的具体用法?PHP PHPUnit_Framework_Error_Notice怎么用?PHP PHPUnit_Framework_Error_Notice使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: tearDown

 public function tearDown()
 {
     unset($this->app);
     PHPUnit_Framework_Error_Warning::$enabled = $this->warning_enabled;
     PHPUnit_Framework_Error_Notice::$enabled = $this->notice_enabled;
     PHPUnit_Framework_Error_Deprecated::$enabled = $this->deprecated_enabled;
 }
开发者ID:loopsframework,项目名称:base,代码行数:7,代码来源:LoopsTestCase.php

示例2: testSimpleInvocationError

 public function testSimpleInvocationError()
 {
     \PHPUnit_Framework_Error_Notice::$enabled = FALSE;
     $this->object->setCallable(array('SimplyNot', 'callable'));
     $this->setExpectedException('\\Fwk\\Di\\Exceptions\\InvalidCallableDefinitionException');
     $this->object->invoke($this->getContainer());
 }
开发者ID:fwk,项目名称:di,代码行数:7,代码来源:CallableDefinitionTest.php

示例3: testLoadVendorDatabaseBadMask

 public function testLoadVendorDatabaseBadMask()
 {
     // Disable PHPUnit's error handler which would stop execution upon the
     // first error.
     \PHPUnit_Framework_Error_Notice::$enabled = false;
     // Disable all console error output
     $displayErrors = ini_get('display_errors');
     $logErrors = ini_get('log_errors');
     ini_set('display_errors', false);
     ini_set('log_errors', false);
     if (extension_loaded('xdebug')) {
         xdebug_disable();
     }
     // Invoke the tested method
     $input = array("13/37\tshort7", "00:00:5E:00:53:00\tshort");
     MacAddress::loadVendorDatabase($input);
     // Restore error handling
     \PHPUnit_Framework_Error_Notice::$enabled = true;
     if (ini_get('xdebug.default_enable')) {
         xdebug_enable();
     }
     ini_set('display_errors', $displayErrors);
     ini_set('log_errors', $logErrors);
     // Test the generated error
     $lastError = error_get_last();
     $this->assertEquals(E_USER_NOTICE, $lastError['type']);
     $this->assertEquals('Ignoring MAC address 13/37 because mask is not a multiple of 4.', $lastError['message']);
     // Parsing should continue after error.
     $expected = array(array('address' => '00005E005300', 'length' => 12, 'vendor' => 'short'));
     $reflectionClass = new \ReflectionClass('Library\\MacAddress');
     $this->assertEquals($expected, $reflectionClass->getStaticProperties()['_vendorList']);
 }
开发者ID:patrickpreuss,项目名称:Braintacle,代码行数:32,代码来源:MacAddressTest.php

示例4: setUp

 public function setUp()
 {
     PHPUnit_Framework_Error_Notice::$enabled = FALSE;
     parent::setUp();
     $this->ProductCredit = ClassRegistry::init('ProductCredit');
     //$this->OrdersController->startup($this->Controller);
 }
开发者ID:kameshwariv,项目名称:testexample,代码行数:7,代码来源:MarchKudosUKTest.php

示例5: testSendPacket

 public function testSendPacket()
 {
     \PHPUnit_Framework_Error_Notice::$enabled = FALSE;
     $packet = $this->getMockBuilder('\\SteamCondenser\\Servers\\Packets\\SteamPacket')->disableOriginalConstructor()->getMock();
     $packet->expects($this->once())->method('__toString')->will($this->returnValue('test'));
     $this->udpSocket->expects($this->once())->method('send')->with('test');
     $this->socket->send($packet);
 }
开发者ID:egoistonly,项目名称:steam-condenser-php,代码行数:8,代码来源:SteamSocketTest.php

示例6: doEnhancedRun

 public function doEnhancedRun(\PHPUnit_Framework_Test $suite, \PHPUnit_Framework_TestResult $result, array $arguments = array())
 {
     $this->handleConfiguration($arguments);
     if (is_integer($arguments['repeat'])) {
         $suite = new \PHPUnit_Extensions_RepeatedTest($suite, $arguments['repeat'], $arguments['filter'], $arguments['groups'], $arguments['excludeGroups'], $arguments['processIsolation']);
     }
     if (!$arguments['convertErrorsToExceptions']) {
         $result->convertErrorsToExceptions(FALSE);
     }
     if (!$arguments['convertNoticesToExceptions']) {
         \PHPUnit_Framework_Error_Notice::$enabled = FALSE;
     }
     if (!$arguments['convertWarningsToExceptions']) {
         \PHPUnit_Framework_Error_Warning::$enabled = FALSE;
     }
     if ($arguments['stopOnError']) {
         $result->stopOnError(TRUE);
     }
     if ($arguments['stopOnFailure']) {
         $result->stopOnFailure(TRUE);
     }
     if ($arguments['stopOnIncomplete']) {
         $result->stopOnIncomplete(TRUE);
     }
     if ($arguments['stopOnSkipped']) {
         $result->stopOnSkipped(TRUE);
     }
     if ($this->printer === NULL) {
         if (isset($arguments['printer']) && $arguments['printer'] instanceof \PHPUnit_Util_Printer) {
             $this->printer = $arguments['printer'];
         } else {
             $this->printer = new \Codeception\PHPUnit\ResultPrinter\UI(NULL, $arguments['verbose'], $arguments['colors'], $arguments['debug']);
         }
     }
     if (isset($arguments['report'])) {
         if ($arguments['report']) {
             $this->printer = new \Codeception\PHPUnit\ResultPrinter\Report();
         }
     }
     if (isset($arguments['html'])) {
         if ($arguments['html']) {
             $arguments['listeners'][] = new \Codeception\PHPUnit\ResultPrinter\HTML($arguments['html']);
         }
     }
     $arguments['listeners'][] = $this->printer;
     // clean up listeners between suites
     foreach ($arguments['listeners'] as $listener) {
         $result->removeListener($listener);
         $result->addListener($listener);
     }
     if ($arguments['strict']) {
         $result->strictMode(TRUE);
     }
     $suite->run($result, $arguments['filter'], $arguments['groups'], $arguments['excludeGroups'], $arguments['processIsolation']);
     unset($suite);
     $result->flushListeners();
     return $result;
 }
开发者ID:nike-17,项目名称:Codeception,代码行数:58,代码来源:Runner.php

示例7: setUp

 /**
  * Set up method
  */
 protected function setUp()
 {
     $this->corporateDirectoryWebServiceWrapper = new CorporateDirectoryWebServiceWrapper();
     $this->fixture = sfConfig::get('sf_plugins_dir') . '/orangehrmCorporateDirectoryPlugin/test/fixtures/EmployeeDirectoryWrapperData.yml';
     $this->manager = new WSManager();
     $this->helper = new WSHelper();
     PHPUnit_Framework_Error_Warning::$enabled = FALSE;
     PHPUnit_Framework_Error_Notice::$enabled = FALSE;
 }
开发者ID:lahirwisada,项目名称:orangehrm,代码行数:12,代码来源:CorporateDirectoryWebServiceWrapperTest.php

示例8: setUp

 public function setUp()
 {
     PHPUnit_Framework_Error_Notice::$enabled = FALSE;
     parent::setUp();
     $CakeRequest = new CakeRequest();
     $CakeResponse = new CakeResponse();
     $this->Controller = new TestController($CakeRequest, $CakeResponse);
     $Collection = new ComponentCollection();
     $this->PromotionController = new PromotionController($Collection);
 }
开发者ID:kameshwariv,项目名称:testexample,代码行数:10,代码来源:PromotionControllerTest.php

示例9: setUp

 public function setUp()
 {
     PHPUnit_Framework_Error_Notice::$enabled = FALSE;
     parent::setUp();
     $CakeRequest = new CakeRequest();
     $CakeResponse = new CakeResponse();
     $this->Controller = new TestController($CakeRequest, $CakeResponse);
     $Collection = new ComponentCollection();
     $this->PartyCreateController = new PartyController($Collection);
     $this->Party = ClassRegistry::init('Party');
 }
开发者ID:kameshwariv,项目名称:testexample,代码行数:11,代码来源:NewPresenterNzPartyCreationTest.php

示例10: setUp

 /**
  * Set up method
  */
 protected function setUp()
 {
     $this->adminWebServiceWrapper = new AdminWebServiceWrapper();
     $this->jobTitlefixture = sfConfig::get('sf_plugins_dir') . '/orangehrmAdminPlugin/test/fixtures/JobTitleDao.yml';
     $this->locationFixture = sfConfig::get('sf_plugins_dir') . '/orangehrmAdminPlugin/test/fixtures/LocationDao.yml';
     $this->locationTestCases = sfYaml::load(sfConfig::get('sf_plugins_dir') . '/orangehrmAdminPlugin/test/fixtures/LocationDao.yml');
     $this->manager = new WSManager();
     $this->helper = new WSHelper();
     PHPUnit_Framework_Error_Warning::$enabled = FALSE;
     PHPUnit_Framework_Error_Notice::$enabled = FALSE;
 }
开发者ID:lahirwisada,项目名称:orangehrm,代码行数:14,代码来源:AdminWebServiceWrapperTest.php

示例11: setUp

 public function setUp()
 {
     parent::setUp();
     PHPUnit_Framework_Error_Notice::$enabled = FALSE;
     $CakeRequest = new CakeRequest();
     $CakeResponse = new CakeResponse();
     $this->Controller = new TestController($CakeRequest, $CakeResponse);
     $Collection = new ComponentCollection();
     $this->Payment = new PaymentComponent($Collection);
     $this->Payment->startup($this->Controller);
 }
开发者ID:kameshwariv,项目名称:testexample,代码行数:11,代码来源:PaymentComponentTest.php

示例12: setUp

 public function setUp()
 {
     PHPUnit_Framework_Error_Notice::$enabled = FALSE;
     parent::setUp();
     $CakeRequest = new CakeRequest();
     $CakeResponse = new CakeResponse();
     $this->Controller = new TestController($CakeRequest, $CakeResponse);
     $Collection = new ComponentCollection();
     $this->ShoppingcartController = new ShoppingcartController($Collection);
     $this->ShoppingCartItem = ClassRegistry::init('ShoppingCartItem');
 }
开发者ID:kameshwariv,项目名称:testexample,代码行数:11,代码来源:SepkudosgermanControllerTest.php

示例13: setUp

 public function setUp()
 {
     PHPUnit_Framework_Error_Notice::$enabled = FALSE;
     parent::setUp();
     $CakeRequest = new CakeRequest();
     $CakeResponse = new CakeResponse();
     $this->Controller = new TestController($CakeRequest, $CakeResponse);
     $Collection = new ComponentCollection();
     $this->PresenterController = new PresenterController($Collection);
     $this->RoyaltiesEarned = ClassRegistry::init('RoyaltiesEarned');
     //$this->OrdersController->startup($this->Controller);
 }
开发者ID:kameshwariv,项目名称:testexample,代码行数:12,代码来源:RegisterTest.php

示例14: setUp

 public function setUp()
 {
     PHPUnit_Framework_Error_Notice::$enabled = FALSE;
     parent::setUp();
     $CakeRequest = new CakeRequest();
     $CakeResponse = new CakeResponse();
     $this->Controller = new TestController($CakeRequest, $CakeResponse);
     $Collection = new ComponentCollection();
     $this->AppController = new AppController($Collection);
     $this->TestController = new TestTwoController($collection);
     //$this->OrdersController->startup($this->Controller);
 }
开发者ID:kameshwariv,项目名称:testexample,代码行数:12,代码来源:AppControllerTest.php

示例15: wrapException

 function wrapException($cb, $type = NULL, $code = NULL)
 {
     PHPUnit_Framework_Error_Notice::$enabled = false;
     $exOut = NULL;
     try {
         $cb();
     } catch (Exception $ex) {
         $exOut = $ex;
     }
     PHPUnit_Framework_Error_Notice::$enabled = true;
     if ($type !== NULL) {
         $this->assertErrorType($type, $exOut);
     }
     if ($code !== NULL) {
         $this->assertErrorCode($code, $exOut);
     }
     return $exOut;
 }
开发者ID:wesong,项目名称:php-couchbase,代码行数:18,代码来源:CouchbaseTestCase.php


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