Skip to content

Commit

Permalink
Merge pull request #11 from aik099/use-prophecy-phpunit-fork
Browse files Browse the repository at this point in the history
Use "console-helpers/prophecy-phpunit" fork
  • Loading branch information
aik099 authored Mar 29, 2024
2 parents b3f684f + efc7b84 commit e71cab3
Show file tree
Hide file tree
Showing 7 changed files with 95 additions and 22 deletions.
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
"require-dev": {
"aik099/coding-standard": "dev-master",
"yoast/phpunit-polyfills": "^1.0",
"phpspec/prophecy": "^1.10"
"phpspec/prophecy": "^1.10",
"console-helpers/prophecy-phpunit": "^2.0@dev"
},
"autoload": {
"psr-4": {
Expand Down
79 changes: 66 additions & 13 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 22 additions & 0 deletions tests/ConsoleKit/AbstractTestCase.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?php
/**
* This file is part of the Console-Kit library.
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*
* @copyright Alexander Obuhovich <[email protected]>
* @link https://github.com/console-helpers/console-kit
*/

namespace Tests\ConsoleHelpers\ConsoleKit;


use PHPUnit\Framework\TestCase;
use Prophecy\PhpUnit\ProphecyTrait;

abstract class AbstractTestCase extends TestCase
{

use ProphecyTrait;

}
3 changes: 1 addition & 2 deletions tests/ConsoleKit/ConsoleIOTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,13 @@


use ConsoleHelpers\ConsoleKit\ConsoleIO;
use PHPUnit\Framework\TestCase;
use Prophecy\Argument;
use Prophecy\Prophecy\ObjectProphecy;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Question\ChoiceQuestion;
use Symfony\Component\Console\Question\ConfirmationQuestion;

class ConsoleIOTest extends TestCase
class ConsoleIOTest extends AbstractTestCase
{

/**
Expand Down
3 changes: 1 addition & 2 deletions tests/ConsoleKit/ContainerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,8 @@


use ConsoleHelpers\ConsoleKit\Container;
use PHPUnit\Framework\TestCase;

class ContainerTest extends TestCase
class ContainerTest extends AbstractTestCase
{

/**
Expand Down
4 changes: 2 additions & 2 deletions tests/ConsoleKit/Helper/ContainerHelperTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@

use ConsoleHelpers\ConsoleKit\Helper\ContainerHelper;
use ConsoleHelpers\ConsoleKit\Container;
use PHPUnit\Framework\TestCase;
use Tests\ConsoleHelpers\ConsoleKit\AbstractTestCase;

class ContainerHelperTest extends TestCase
class ContainerHelperTest extends AbstractTestCase
{

/**
Expand Down
3 changes: 1 addition & 2 deletions tests/ConsoleKit/WorkingDirectoryAwareTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,8 @@


use ConsoleHelpers\ConsoleKit\WorkingDirectory;
use PHPUnit\Framework\TestCase;

abstract class WorkingDirectoryAwareTestCase extends TestCase
abstract class WorkingDirectoryAwareTestCase extends AbstractTestCase
{

/**
Expand Down

0 comments on commit e71cab3

Please sign in to comment.