From 0905bb7d2dd5fe09c4fb6676a33c88a20b3b8869 Mon Sep 17 00:00:00 2001 From: "Barry vd. Heuvel" Date: Mon, 14 May 2018 15:37:29 +0200 Subject: [PATCH] Stricter tests --- phpunit.xml.dist | 2 +- tests/Omnipay/Common/CreditCardTest.php | 3 +++ tests/Omnipay/Common/HelperTest.php | 9 +++++++++ tests/Omnipay/OmnipayTest.php | 2 ++ tests/bootstrap.php | 10 ---------- 5 files changed, 15 insertions(+), 11 deletions(-) delete mode 100644 tests/bootstrap.php diff --git a/phpunit.xml.dist b/phpunit.xml.dist index a61160cd..a35b7362 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,7 +1,7 @@ assertSame(2016, $parameters['expiryYear']); } + /** + * @doesNotPerformAssertions + */ public function testValidateFixture() { $this->card->validate(); diff --git a/tests/Omnipay/Common/HelperTest.php b/tests/Omnipay/Common/HelperTest.php index 1d47f56c..0c11ecca 100644 --- a/tests/Omnipay/Common/HelperTest.php +++ b/tests/Omnipay/Common/HelperTest.php @@ -43,12 +43,18 @@ public function testValidateLuhnNull() $this->assertTrue($result); } + /** + * @doesNotPerformAssertions + */ public function testInitializeIgnoresNull() { $target = m::mock(); Helper::initialize($target, null); } + /** + * @doesNotPerformAssertions + */ public function testInitializeCallsSetters() { $target = m::mock('\Omnipay\Common\CreditCard'); @@ -58,6 +64,9 @@ public function testInitializeCallsSetters() Helper::initialize($target, array('name' => 'adrian', 'number' => '1234')); } + /** + * @doesNotPerformAssertions + */ public function testInitializeIgnoresInvalidParameters() { $target = m::mock('\Omnipay\Common\CreditCard'); diff --git a/tests/Omnipay/OmnipayTest.php b/tests/Omnipay/OmnipayTest.php index 2ad08124..eb0751d5 100644 --- a/tests/Omnipay/OmnipayTest.php +++ b/tests/Omnipay/OmnipayTest.php @@ -10,6 +10,8 @@ class OmnipayTest extends TestCase public function tearDown() { Omnipay::setFactory(null); + + parent::tearDown(); } public function testGetFactory() diff --git a/tests/bootstrap.php b/tests/bootstrap.php deleted file mode 100644 index 847298ef..00000000 --- a/tests/bootstrap.php +++ /dev/null @@ -1,10 +0,0 @@ -add('Omnipay', __DIR__);