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


PHP PHPUnit_Framework_TestCase::assertNotNull方法代码示例

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


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

示例1: check

 public static function check(\PHPUnit_Framework_TestCase $test, $name, $display, $url, Organization $organization = null)
 {
     $test->assertNotNull($organization);
     $test->assertEquals($name, $organization->getOrganizationName());
     $test->assertEquals($display, $organization->getOrganizationDisplayName());
     $test->assertEquals($url, $organization->getOrganizationURL());
 }
开发者ID:aarnaud,项目名称:lightSAML,代码行数:7,代码来源:OrganizationChecker.php

示例2: checkCertificateCN

 public static function checkCertificateCN(\PHPUnit_Framework_TestCase $test, $use, $cn, KeyDescriptor $kd = null)
 {
     $test->assertNotNull($kd);
     $test->assertEquals($use, $kd->getUse());
     $test->assertNotEmpty($kd->getCertificate()->getData());
     $crt = openssl_x509_parse($kd->getCertificate()->toPem());
     $test->assertEquals($cn, $crt['subject']['CN']);
 }
开发者ID:aarnaud,项目名称:lightSAML,代码行数:8,代码来源:KeyDescriptorChecker.php

示例3: assert

 public function assert()
 {
     $title = $this->webDriver->getTitle();
     \PHPUnit_Framework_TestCase::assertNotNull($title);
     \PHPUnit_Framework_TestCase::assertNotNull($this->title);
     $title = trim($title);
     \PHPUnit_Framework_TestCase::assertEquals($title, $this->title);
 }
开发者ID:kschroeder,项目名称:Magium,代码行数:8,代码来源:TitleEquals.php

示例4: check

 public static function check(\PHPUnit_Framework_TestCase $test, $type, $company, $givenName, $surName, $email, $phone, ContactPerson $contact = null)
 {
     $test->assertNotNull($contact);
     $test->assertEquals($type, $contact->getContactType());
     $test->assertEquals($company, $contact->getCompany());
     $test->assertEquals($givenName, $contact->getGivenName());
     $test->assertEquals($surName, $contact->getSurName());
     $test->assertEquals($email, $contact->getEmailAddress());
     $test->assertEquals($phone, $contact->getTelephoneNumber());
 }
开发者ID:aarnaud,项目名称:lightSAML,代码行数:10,代码来源:ContactPersonChecker.php

示例5: assert

 public function assert()
 {
     $title = $this->webDriver->getTitle();
     \PHPUnit_Framework_TestCase::assertNotNull($title);
     \PHPUnit_Framework_TestCase::assertNotNull($this->title);
     $title = trim($title);
     $pos = strpos($title, $this->title);
     \PHPUnit_Framework_TestCase::assertNotFalse($pos);
     $testEquals = $pos + strlen($this->title);
     $browserEquals = strlen($title);
     \PHPUnit_Framework_TestCase::assertEquals($testEquals, $browserEquals);
 }
开发者ID:kschroeder,项目名称:Magium,代码行数:12,代码来源:TitleEndsWith.php

示例6: check

 public static function check(\PHPUnit_Framework_TestCase $test, $binding, $location, Endpoint $svc = null)
 {
     $test->assertNotNull($svc);
     $test->assertEquals($binding, $svc->getBinding());
     $test->assertEquals($location, $svc->getLocation());
 }
开发者ID:aarnaud,项目名称:lightSAML,代码行数:6,代码来源:EndpointChecker.php

示例7: iCanSeeAllTheAssociatedDataForRndEsuStripInTheEpDatabaseWithValidFieldValues

 /**
  * @Then I can see all the associated data for RND17 Schools ESU strip in the EP database with valid field values
  */
 public function iCanSeeAllTheAssociatedDataForRndEsuStripInTheEpDatabaseWithValidFieldValues()
 {
     $db = new EpDbConnectionAndDataExtraction();
     //echo TestData::$formData['esu_widget_email'];
     $db->dbEmailSubscribes(TestData::$formData['esu_strip_email'], $this->testData->dbServerTest);
     if (!EpMessageQueueAccess::$jsonMQString['timestamp'] == null && strcmp(EpMessageQueueAccess::$jsonMQString['email'], TestData::$formData['esu_strip_email']) == 0 && strcmp(EpMessageQueueAccess::$jsonMQString['campaign'], 'RND17') == 0) {
         PHPUnit_Framework_TestCase::assertEquals(EpMessageQueueAccess::$jsonMQString['timestamp'], $db->dbData['Timestamp'], "Failed:Actual and expected Timestamp is not equal in EP DB, Plz check manually ");
     } else {
         echo "Messages are consumed before looking into MessageQueue-DatabaseTimestamp:" . $db->dbData['Timestamp'];
     }
     PHPUnit_Framework_TestCase::assertNotNull($db->dbData['Timestamp'], "Failed: Timestamp is null: Plz check manually");
     PHPUnit_Framework_TestCase::assertEquals(TestData::$formData['esu_strip_email'], $db->dbData['EmailAddress'], 'Failed:Actual and expected Email is not equal in EP DB, plz check maually in the DB');
     PHPUnit_Framework_TestCase::assertTrue(strpos($db->dbData['TransSourceURL'], '/node/1') !== false, 'Failed: Correct transsource URL was not displayed in EP DB, plz check maually in the MQ');
     PHPUnit_Framework_TestCase::assertEquals('esu', $db->dbData['TransType'], 'Failed:Actual and expected trasType is not equal in EP DB, plz check maually in the DB');
     PHPUnit_Framework_TestCase::assertEquals('RND17', $db->dbData['Campaign'], 'Failed:Actual and expected Campaign is not equal in EP DB, plz check maually in the DB');
     if (strcmp(TestData::$device, 'Desktop') == 0) {
         PHPUnit_Framework_TestCase::assertEquals($this->testData->RND17DesktopSchoolsESUStripTransSource, $db->dbData['TransSource'], 'Failed:Actual and expected desktop transSource is not equal in EP Queue, plz check maually in the MQ');
     } else {
         if (strcmp(TestData::$device, 'Mobile') == 0) {
             PHPUnit_Framework_TestCase::assertEquals($this->testData->RND17MobileSchoolsESUStripTransSource, $db->dbData['TransSource'], 'Failed:Actual and expected mobile transSource is not equal in EP Queue, plz check maually in the MQ');
         }
     }
     if (!empty(TestData::$formData['SchoolsAgeGroup'])) {
         PHPUnit_Framework_TestCase::assertEquals('teacher', $db->dbData['TeacherList'], "Failed: Expected Teacher List value is not found in db: Plz check manually");
         if (TestData::$formData['SchoolsAgeGroup'] == 'Early Years or Nursery') {
             PHPUnit_Framework_TestCase::assertEquals('EY', $db->dbData['SchoolPhase'], "Failed: Expected SchoolPhase value for Early years not found in db: Plz check manually");
         } else {
             if (TestData::$formData['SchoolsAgeGroup'] == 'Primary') {
                 PHPUnit_Framework_TestCase::assertEquals('PY', $db->dbData['SchoolPhase'], "Failed: Expected SchoolPhase value for Primary not found in db: Plz check manually");
             } else {
                 if (TestData::$formData['SchoolsAgeGroup'] == 'Secondary') {
                     PHPUnit_Framework_TestCase::assertEquals('SY', $db->dbData['SchoolPhase'], "Failed: Expected SchoolPhase value for Secondary  not found in db: Plz check manually");
                 } else {
                     if (TestData::$formData['SchoolsAgeGroup'] == 'Further Education or Sixth-Form College') {
                         PHPUnit_Framework_TestCase::assertEquals('FE', $db->dbData['SchoolPhase'], "Failed: Expected SchoolPhase value for Further Education not found in db: Plz check manually");
                     } else {
                         if (TestData::$formData['SchoolsAgeGroup'] == 'Higher Education') {
                             PHPUnit_Framework_TestCase::assertEquals('HE', $db->dbData['SchoolPhase'], "Failed: Expected SchoolPhase value for Higher Education not found in db: Plz check manually");
                         } else {
                             if (TestData::$formData['SchoolsAgeGroup'] == 'Other') {
                                 PHPUnit_Framework_TestCase::assertEquals('other', $db->dbData['SchoolPhase'], "Failed: Expected SchoolPhase value for Other not found in db: Plz check manually");
                             }
                         }
                     }
                 }
             }
         }
     }
     if (empty(TestData::$formData['SchoolsAgeGroup'])) {
         PHPUnit_Framework_TestCase::assertEquals('general', $db->dbData['GeneralList'], "Failed: Expected General List value is not found in db: Plz check manually");
     }
 }
开发者ID:shravanmechineni,项目名称:Shravan_Tests,代码行数:55,代码来源:ESUContext.php

示例8: assertEqualsTokenRestrictionTemplate

 /**
  * @param \PHPUnit_Framework_TestCase $test
  * @param TokenRestrictionTemplate    $expected
  * @param TokenRestrictionTemplate    $actual
  */
 public static function assertEqualsTokenRestrictionTemplate($test, $expected, $actual)
 {
     // Assert
     $test->assertNotNull($expected);
     $test->assertNotNull($actual);
     $test->assertEquals($expected->getTokenType(), $actual->getTokenType());
     $test->assertEquals($expected->getAudience(), $actual->getAudience());
     $test->assertEquals($expected->getIssuer(), $actual->getIssuer());
     $test->assertEqualsVerificationKey($test, $expected->getPrimaryVerificationKey(), $actual->getPrimaryVerificationKey());
     $test->assertEquals(count($expected->getAlternateVerificationKeys()), count($actual->getAlternateVerificationKeys()));
     for ($i = 0; $i < count($expected->getAlternateVerificationKeys()); ++$i) {
         self::assertEqualsVerificationKey($test, $expected->getAlternateVerificationKeys()[$i], $actual->getAlternateVerificationKeys()[$i]);
     }
     $test->assertEquals(count($expected->getRequiredClaims()), count($actual->getRequiredClaims()));
     for ($i = 0; $i < count($expected->getRequiredClaims()); ++$i) {
         self::assertEqualsRequiredClaim($test, $expected->getRequiredClaims()[$i], $actual->getRequiredClaims()[$i]);
     }
     if ($expected->getOpenIdConnectDiscoveryDocument() != null) {
         $test->assertNotNull($actual->getOpenIdConnectDiscoveryDocument());
         $test->assertEquals($expected->getOpenIdConnectDiscoveryDocument()->getOpenIdDiscoveryUri(), $actual->getOpenIdConnectDiscoveryDocument()->getOpenIdDiscoveryUri());
     } else {
         $test->assertNull($actual->getOpenIdConnectDiscoveryDocument());
     }
 }
开发者ID:southworkscom,项目名称:azure-sdk-for-php,代码行数:29,代码来源:TokenRestrictionTemplateSerializerTest.php

示例9: iShouldSeeInTheElement

 /**
  * @Then I should see :value in the :tag element
  */
 public function iShouldSeeInTheElement($value, $tag)
 {
     $page = $this->getSession()->getPage();
     $el = $page->find('css', $tag);
     Assertions::assertNotNull($el);
     $actual = $el->getText();
     Assertions::assertContains($value, $actual);
 }
开发者ID:bnowack,项目名称:backbone-php,代码行数:11,代码来源:ProjectContext.php


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