Skip to content

Commit

Permalink
Stricter tests
Browse files Browse the repository at this point in the history
  • Loading branch information
barryvdh committed May 14, 2018
1 parent 61d8e3c commit 0905bb7
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 11 deletions.
2 changes: 1 addition & 1 deletion phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit backupGlobals="false"
backupStaticAttributes="false"
bootstrap="tests/bootstrap.php"
bootstrap="vendor/autoload.php"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
Expand Down
3 changes: 3 additions & 0 deletions tests/Omnipay/Common/CreditCardTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ public function testGetParamters()
$this->assertSame(2016, $parameters['expiryYear']);
}

/**
* @doesNotPerformAssertions
*/
public function testValidateFixture()
{
$this->card->validate();
Expand Down
9 changes: 9 additions & 0 deletions tests/Omnipay/Common/HelperTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand All @@ -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');
Expand Down
2 changes: 2 additions & 0 deletions tests/Omnipay/OmnipayTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ class OmnipayTest extends TestCase
public function tearDown()
{
Omnipay::setFactory(null);

parent::tearDown();
}

public function testGetFactory()
Expand Down
10 changes: 0 additions & 10 deletions tests/bootstrap.php

This file was deleted.

0 comments on commit 0905bb7

Please sign in to comment.