Skip to content

Commit

Permalink
PHPUnit 6.0 refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
lastzero committed Feb 4, 2017
1 parent 34875ec commit d20e7c4
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 10 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"kriswallsmith/buzz": "~0.10",
"basho/riak": "~2.0",
"swiftmailer/swiftmailer": "5.*",
"phpunit/phpunit": "<6.0.0"
"phpunit/phpunit": ">=6.0"
},
"autoload": {
"psr-0": { "TestTools\\": "src/" }
Expand Down
3 changes: 2 additions & 1 deletion src/TestTools/TestCase/UnitTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace TestTools\TestCase;

use PHPUnit\Framework\TestCase;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\Config\FileLocator;
use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
Expand Down Expand Up @@ -42,7 +43,7 @@
* @package TestTools
* @license MIT
*/
abstract class UnitTestCase extends \PHPUnit_Framework_TestCase
abstract class UnitTestCase extends TestCase
{
use FixturePathTrait;

Expand Down
2 changes: 2 additions & 0 deletions src/TestTools/Tests/Doctrine/DBAL/ConnectionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -151,12 +151,14 @@ public function testCommit()
{
$this->db->beginTransaction();
$this->db->commit();
$this->assertTrue(true);
}

public function testRollBack()
{
$this->db->beginTransaction();
$this->db->rollBack();
$this->assertTrue(true);
}

public function testGetDatabasePlatform()
Expand Down
14 changes: 8 additions & 6 deletions src/TestTools/Tests/Fixture/FileFixtureTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,18 @@ public function testNormalizePath () {
$this->assertEquals(__DIR__ . DIRECTORY_SEPARATOR, FileFixture::normalizePath(__DIR__));
$this->assertEquals(__DIR__ . DIRECTORY_SEPARATOR, FileFixture::normalizePath(__DIR__ . DIRECTORY_SEPARATOR));
}


/**
* @expectedException \TestTools\Fixture\Exception\FixtureInvalidDirectoryException
*/
public function testNormalizePathException () {
$this->setExpectedException('TestTools\Fixture\Exception\FixtureInvalidDirectoryException');

FileFixture::normalizePath('/a/b/c');
}

public function testConstructor () {
$this->setExpectedException('TestTools\Fixture\Exception\FixtureEmptyFilenameException');

/**
* @expectedException \TestTools\Fixture\Exception\FixtureEmptyFilenameException
*/
public function testConstructor () {
new FileFixture('');
}

Expand Down
2 changes: 1 addition & 1 deletion src/TestTools/Tests/Profiler/ProfilerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace TestTools\Tests\Profiler;

use TestTools\Profiler\Profiler;
use PHPUnit_Framework_TestCase as TestCase;
use PHPUnit\Framework\TestCase;

/**
* @author Michael Mayer <michael@lastzero.net>
Expand Down
2 changes: 1 addition & 1 deletion src/TestTools/Tests/Util/FixedDateTimeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

namespace TestTools\Tests\Util;

use PHPUnit\Framework\TestCase;
use TestTools\Util\FixedDateTime;
use PHPUnit_Framework_TestCase as TestCase;

/**
* @author Michael Mayer <michael@lastzero.net>
Expand Down

0 comments on commit d20e7c4

Please sign in to comment.