From 3525f1b6da7e15ba6513db0d8a115c31ace2da11 Mon Sep 17 00:00:00 2001 From: Marcus Bointon Date: Mon, 28 Feb 2022 16:03:27 +0100 Subject: [PATCH] Give up on that test config --- test/OAuth/OAuthTest.php | 22 +++++----------------- 1 file changed, 5 insertions(+), 17 deletions(-) diff --git a/test/OAuth/OAuthTest.php b/test/OAuth/OAuthTest.php index d85549ce..4e810764 100644 --- a/test/OAuth/OAuthTest.php +++ b/test/OAuth/OAuthTest.php @@ -58,24 +58,12 @@ final class OAuthTest extends TestCase $PHPMailer->getOAuth(), 'Setting Oauth property to an instance of the OAuth class failed' ); - $this->expectException(\Error::class); - $PHPMailer->setOAuth(new \stdClass()); $PHPMailer->setOAuth(new DummyOAuthProvider()); - } - - /** - * Test OAuth class on more recent PHP versions. - * - * @requires PHP >= 7.0 - * @covers PHPMailer\PHPMailer\PHPMailer::setOAuth - * @covers PHPMailer\PHPMailer\OAuthTokenProvider - */ - public function testOAuthRecent() - { - $PHPMailer = new PHPMailer(true); - - $this->expectException(\TypeError::class); - $PHPMailer->setOAuth(new \stdClass()); + self::assertInstanceOf( + OAuthTokenProvider::class, + $PHPMailer->getOAuth(), + 'Setting Oauth property to an instance of the OAuth class failed (2)' + ); } }