X-Git-Url: http://aleph1.co.uk/gitweb/?a=blobdiff_plain;ds=sidebyside;f=web%2Fcore%2Ftests%2FDrupal%2FTests%2FComponent%2FUtility%2FCryptTest.php;h=80208ef294f52ac69af244a8fb5bfe3b2b3e35d5;hb=74df008bdbb3a11eeea356744f39b802369bda3c;hp=38743dfd5d34318ac828eb9c671d55bfdf0beeef;hpb=a2bd1bf0c2c1f1a17d188f4dc0726a45494cefae;p=yaffs-website diff --git a/web/core/tests/Drupal/Tests/Component/Utility/CryptTest.php b/web/core/tests/Drupal/Tests/Component/Utility/CryptTest.php index 38743dfd5..80208ef29 100644 --- a/web/core/tests/Drupal/Tests/Component/Utility/CryptTest.php +++ b/web/core/tests/Drupal/Tests/Component/Utility/CryptTest.php @@ -2,8 +2,8 @@ namespace Drupal\Tests\Component\Utility; -use Drupal\Tests\UnitTestCase; use Drupal\Component\Utility\Crypt; +use PHPUnit\Framework\TestCase; /** * Tests random byte generation. @@ -12,7 +12,7 @@ use Drupal\Component\Utility\Crypt; * * @coversDefaultClass \Drupal\Component\Utility\Crypt */ -class CryptTest extends UnitTestCase { +class CryptTest extends TestCase { /** * Tests random byte generation. @@ -77,7 +77,12 @@ class CryptTest extends UnitTestCase { * Key to use in hashing process. */ public function testHmacBase64Invalid($data, $key) { - $this->setExpectedException(\InvalidArgumentException::class); + if (method_exists($this, 'expectException')) { + $this->expectException('InvalidArgumentException'); + } + else { + $this->setExpectedException('InvalidArgumentException'); + } Crypt::hmacBase64($data, $key); }