mirror of
https://github.com/emilybache/GildedRose-Refactoring-Kata.git
synced 2026-02-15 06:21:29 +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": {
|
||||
"psr-4": {
|
||||
"Tests\\": "tests/",
|
||||
"Tests\\": "tests/approval/",
|
||||
"PhpUnitTests\\": "tests/phpunit/",
|
||||
"BehatTests\\": "tests/behat/contexts/"
|
||||
}
|
||||
},
|
||||
"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",
|
||||
"check-cs": "ecs check",
|
||||
"fix-cs": "ecs check --fix",
|
||||
|
||||
@ -6,8 +6,11 @@
|
||||
</include>
|
||||
</coverage>
|
||||
<testsuites>
|
||||
<testsuite name="AllTests">
|
||||
<directory>./tests</directory>
|
||||
<testsuite name="ApprovalTests">
|
||||
<directory>./tests/approval</directory>
|
||||
</testsuite>
|
||||
<testsuite name="UnitTests">
|
||||
<directory>./tests/phpunit</directory>
|
||||
</testsuite>
|
||||
</testsuites>
|
||||
</phpunit>
|
||||
|
||||
@ -34,7 +34,7 @@ class ApprovalTest extends TestCase
|
||||
ob_start();
|
||||
|
||||
$argv = ['', '30'];
|
||||
include(__DIR__ . '/../fixtures/texttest_fixture.php');
|
||||
include(__DIR__ . '/../../fixtures/texttest_fixture.php');
|
||||
|
||||
$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