mirror of
https://github.com/emilybache/GildedRose-Refactoring-Kata.git
synced 2026-02-15 14:31:28 +00:00
To provide a place for unit tests, move approval tests and change config
This commit is contained in:
parent
bad5ca93fd
commit
46f45e2661
@ -21,12 +21,13 @@
|
|||||||
},
|
},
|
||||||
"autoload-dev": {
|
"autoload-dev": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"Tests\\": "tests/",
|
"Tests\\": "tests/approval/",
|
||||||
|
"PhpUnitTests\\": "tests/phpunit/",
|
||||||
"BehatTests\\": "tests/behat/contexts/"
|
"BehatTests\\": "tests/behat/contexts/"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"tests": "./vendor/bin/phpunit; ./vendor/bin/behat;",
|
"tests": "./vendor/bin/phpunit --testsuite UnitTests; ./vendor/bin/phpunit --testsuite ApprovalTests; ./vendor/bin/behat;",
|
||||||
"test-coverage": "phpunit --coverage-html build/coverage",
|
"test-coverage": "phpunit --coverage-html build/coverage",
|
||||||
"check-cs": "ecs check",
|
"check-cs": "ecs check",
|
||||||
"fix-cs": "ecs check --fix",
|
"fix-cs": "ecs check --fix",
|
||||||
|
|||||||
@ -6,8 +6,11 @@
|
|||||||
</include>
|
</include>
|
||||||
</coverage>
|
</coverage>
|
||||||
<testsuites>
|
<testsuites>
|
||||||
<testsuite name="AllTests">
|
<testsuite name="ApprovalTests">
|
||||||
<directory>./tests</directory>
|
<directory>./tests/approval</directory>
|
||||||
|
</testsuite>
|
||||||
|
<testsuite name="UnitTests">
|
||||||
|
<directory>./tests/phpunit</directory>
|
||||||
</testsuite>
|
</testsuite>
|
||||||
</testsuites>
|
</testsuites>
|
||||||
</phpunit>
|
</phpunit>
|
||||||
|
|||||||
@ -34,7 +34,7 @@ class ApprovalTest extends TestCase
|
|||||||
ob_start();
|
ob_start();
|
||||||
|
|
||||||
$argv = ['', '30'];
|
$argv = ['', '30'];
|
||||||
include(__DIR__ . '/../fixtures/texttest_fixture.php');
|
include(__DIR__ . '/../../fixtures/texttest_fixture.php');
|
||||||
|
|
||||||
$output = ob_get_clean();
|
$output = ob_get_clean();
|
||||||
|
|
||||||
18
php/tests/phpunit/ExampleTest.php
Normal file
18
php/tests/phpunit/ExampleTest.php
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace PhpUnitTests;
|
||||||
|
|
||||||
|
use ApprovalTests\Approvals;
|
||||||
|
use GildedRose\GildedRose;
|
||||||
|
use GildedRose\Item;
|
||||||
|
use PHPUnit\Framework\TestCase;
|
||||||
|
|
||||||
|
class ExamplelTest extends TestCase
|
||||||
|
{
|
||||||
|
public function testFoo(): void
|
||||||
|
{
|
||||||
|
$this->assertTrue(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue
Block a user