[TASK] replaced @expectedException in ext:rsaauth 84/48484/2
authorNadir Sunar <dernadir@gmail.com>
Tue, 7 Jun 2016 15:10:36 +0000 (17:10 +0200)
committerAnja Leichsenring <aleichsenring@ab-softlab.de>
Tue, 7 Jun 2016 15:21:51 +0000 (17:21 +0200)
Resolves: #76496
Releases: master
Change-Id: I2a4213d7a7572e094659a8045b13f2f2a42710ca
Reviewed-on: https://review.typo3.org/48484
Reviewed-by: Frank Naegler <frank.naegler@typo3.org>
Tested-by: Frank Naegler <frank.naegler@typo3.org>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
typo3/sysext/rsaauth/Tests/Unit/KeypairTest.php

index a8f2248..ee91fac 100644 (file)
@@ -69,10 +69,11 @@ class KeypairTest extends \TYPO3\CMS\Core\Tests\UnitTestCase
     /**
      * @test
      *
-     * @expectedException \BadMethodCallException
      */
     public function setExponentCalledTwoTimesThrowsException()
     {
+        $this->expectException(\BadMethodCallException::class);
+        $this->expectExceptionCode(1296062830);
         $this->subject->setExponent(123456);
         $this->subject->setExponent(123456);
     }
@@ -104,10 +105,11 @@ class KeypairTest extends \TYPO3\CMS\Core\Tests\UnitTestCase
     /**
      * @test
      *
-     * @expectedException \BadMethodCallException
      */
     public function setPrivateKeyCalledTwoTimesThrowsException()
     {
+        $this->expectException(\BadMethodCallException::class);
+        $this->expectExceptionCode(1296062831);
         $this->subject->setPrivateKey('foo');
         $this->subject->setPrivateKey('foo');
     }
@@ -139,10 +141,11 @@ class KeypairTest extends \TYPO3\CMS\Core\Tests\UnitTestCase
     /**
      * @test
      *
-     * @expectedException \BadMethodCallException
      */
     public function setPublicKeyCalledTwoTimesThrowsException()
     {
+        $this->expectException(\BadMethodCallException::class);
+        $this->expectExceptionCode(1296062832);
         $this->subject->setPublicKey(123456);
         $this->subject->setPublicKey(123456);
     }