Use PHPUnit\Framework\TestCase instead of PHPUnit_Framework_TestCase

This commit is contained in:
Gabriel Caruso 2017-11-11 04:22:27 -02:00
parent 70d15cc0ec
commit 74ba2b301d
11 changed files with 38 additions and 21 deletions

View File

@ -37,7 +37,7 @@
"justinwalsh/daux.io": "*" "justinwalsh/daux.io": "*"
}, },
"require-dev": { "require-dev": {
"phpunit/phpunit": "~5", "phpunit/phpunit": "~5.7",
"mikey179/vfsStream": "^1.6" "mikey179/vfsStream": "^1.6"
} }
} }

2
composer.lock generated
View File

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"content-hash": "9e938ead59846576154220013f069892", "content-hash": "efcf7514a9c5a5385f89f05c9bec4e6b",
"packages": [ "packages": [
{ {
"name": "guzzlehttp/guzzle", "name": "guzzlehttp/guzzle",

View File

@ -1,4 +1,5 @@
<?php namespace Todaymade\Daux\ContentTypes\Markdown; <?php
namespace Todaymade\Daux\ContentTypes\Markdown;
use org\bovigo\vfs\vfsStream; use org\bovigo\vfs\vfsStream;
use Todaymade\Daux\Config; use Todaymade\Daux\Config;
@ -6,8 +7,9 @@ use Todaymade\Daux\Daux;
use Todaymade\Daux\DauxHelper; use Todaymade\Daux\DauxHelper;
use Todaymade\Daux\Tree\Builder; use Todaymade\Daux\Tree\Builder;
use Todaymade\Daux\Tree\Root; use Todaymade\Daux\Tree\Root;
use PHPUnit\Framework\TestCase;
class LinkRendererTest extends \PHPUnit_Framework_TestCase class LinkRendererTest extends TestCase
{ {
protected function getTree(Config $config) protected function getTree(Config $config)
{ {

View File

@ -1,6 +1,9 @@
<?php namespace Todaymade\Daux; <?php
namespace Todaymade\Daux;
class DauxHelperTest extends \PHPUnit_Framework_TestCase use PHPUnit\Framework\TestCase;
class DauxHelperTest extends TestCase
{ {
public function providerGetFilenames() public function providerGetFilenames()
{ {

View File

@ -1,7 +1,9 @@
<?php <?php
namespace Todaymade\Daux\Format\Confluence; namespace Todaymade\Daux\Format\Confluence;
class ApiTest extends \PHPUnit_Framework_TestCase use PHPUnit\Framework\TestCase;
class ApiTest extends TestCase
{ {
// this test supports upgrade Guzzle to version 6 // this test supports upgrade Guzzle to version 6
public function testClientOptions() public function testClientOptions()

View File

@ -1,8 +1,10 @@
<?php namespace Todaymade\Daux\Format\HTML; <?php
namespace Todaymade\Daux\Format\HTML;
use Todaymade\Daux\Config as MainConfig; use Todaymade\Daux\Config as MainConfig;
use PHPUnit\Framework\TestCase;
class ConfigTest extends \PHPUnit_Framework_TestCase class ConfigTest extends TestCase
{ {
function testHTMLConfigCreation() { function testHTMLConfigCreation() {
$config = new MainConfig(['html' => ['edit_on' => 'test']]); $config = new MainConfig(['html' => ['edit_on' => 'test']]);

View File

@ -1,9 +1,11 @@
<?php namespace Todaymade\Daux\Format\HTML; <?php
namespace Todaymade\Daux\Format\HTML;
use Todaymade\Daux\Config as MainConfig; use Todaymade\Daux\Config as MainConfig;
use \Todaymade\Daux\Format\HTML\ContentTypes\Markdown\CommonMarkConverter; use \Todaymade\Daux\Format\HTML\ContentTypes\Markdown\CommonMarkConverter;
use PHPUnit\Framework\TestCase;
class TableOfContentsTest extends \PHPUnit_Framework_TestCase class TableOfContentsTest extends TestCase
{ {
function testNoTOCByDefault() { function testNoTOCByDefault() {
$converter = new CommonMarkConverter(['daux' => new MainConfig]); $converter = new CommonMarkConverter(['daux' => new MainConfig]);
@ -87,5 +89,3 @@ EXPECTED;
$this->assertEquals($expected, $converter->convertToHtml($source)); $this->assertEquals($expected, $converter->convertToHtml($source));
} }
} }

View File

@ -1,11 +1,13 @@
<?php namespace Todaymade\Daux\Tree; <?php
namespace Todaymade\Daux\Tree;
use org\bovigo\vfs\vfsStream; use org\bovigo\vfs\vfsStream;
use org\bovigo\vfs\vfsStreamDirectory; use org\bovigo\vfs\vfsStreamDirectory;
use Todaymade\Daux\Config; use Todaymade\Daux\Config;
use Todaymade\Daux\Daux; use Todaymade\Daux\Daux;
use PHPUnit\Framework\TestCase;
class BuilderIntegrationTest extends \PHPUnit_Framework_TestCase class BuilderIntegrationTest extends TestCase
{ {
/** /**
* @var vfsStreamDirectory * @var vfsStreamDirectory

View File

@ -1,9 +1,11 @@
<?php namespace Todaymade\Daux\Tree; <?php
namespace Todaymade\Daux\Tree;
use Todaymade\Daux\Config; use Todaymade\Daux\Config;
use Todaymade\Daux\Daux; use Todaymade\Daux\Daux;
use PHPUnit\Framework\TestCase;
class BuilderTest extends \PHPUnit_Framework_TestCase class BuilderTest extends TestCase
{ {
public function providerRemoveSorting() public function providerRemoveSorting()
{ {

View File

@ -1,8 +1,10 @@
<?php namespace Todaymade\Daux\Tree; <?php
namespace Todaymade\Daux\Tree;
use Todaymade\Daux\Config; use Todaymade\Daux\Config;
use PHPUnit\Framework\TestCase;
class ContentTest extends \PHPUnit_Framework_TestCase class ContentTest extends TestCase
{ {
protected function createContent($content) protected function createContent($content)
{ {

View File

@ -1,8 +1,10 @@
<?php namespace Todaymade\Daux\Tree; <?php
namespace Todaymade\Daux\Tree;
use Todaymade\Daux\Config; use Todaymade\Daux\Config;
use PHPUnit\Framework\TestCase;
class DirectoryTest extends \PHPUnit_Framework_TestCase class DirectoryTest extends TestCase
{ {
public function providerSort() public function providerSort()
{ {