Give up on that test config

This commit is contained in:
Marcus Bointon 2022-02-28 16:03:27 +01:00
parent 70c20c6324
commit 3525f1b6da
No known key found for this signature in database
GPG Key ID: DE31CD6EB646AA24
1 changed files with 5 additions and 17 deletions

View File

@ -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)'
);
}
}