Skip to content

Commit 1baa8d9

Browse files
committed
ref #6770 Fixed functional tests
1 parent 1c92a63 commit 1baa8d9

File tree

5 files changed

+11
-19
lines changed

5 files changed

+11
-19
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ $ phpunit
2222
Running the functional tests:
2323

2424
```shell
25+
$ app/console doctrine:schema:drop --force --env=test
26+
$ app/console doctrine:schema:create --env=test
27+
$ app/console unit:populate --env=test
2528
$ phpunit -c phpunit-functional.xml.dist
2629
```
2730

composer.lock

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

phpunit-functional.xml.dist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
processIsolation = "false"
1212
stopOnFailure = "false"
1313
syntaxCheck = "false"
14-
bootstrap = "tests/FunctionalTest/bootstrap.php" >
14+
bootstrap = "app/bootstrap.php.cache" >
1515

1616
<testsuites>
1717
<testsuite name="Functional tests">

tests/FunctionalTest/UnitBundle/ConversionFactorTest.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@ public function testConvert($unit1, $unit2, $expected)
1717
{
1818
$client = static::createClient();
1919

20-
$client->request('GET', '/api/conversion-factor/' . urlencode($unit1) . '/' . urlencode($unit2));
21-
die('/api/conversion-factor/' . urlencode($unit1) . '/' . urlencode($unit2));
20+
$client->request('GET', '/api/conversion-factor?unit1=' . urlencode($unit1) . '&unit2=' . urlencode($unit2));
2221
$response = $client->getResponse();
2322

2423
$this->assertJsonResponse($response);
@@ -31,8 +30,8 @@ public function testConvert($unit1, $unit2, $expected)
3130
public function scenarioProvider()
3231
{
3332
return [
34-
// [ 'm', 'm', 1 ],
35-
// [ 'km', 'm', 1000 ],
33+
[ 'm', 'm', 1 ],
34+
[ 'km', 'm', 1000 ],
3635
[ 'km.h^-1', 'km.h^-1', 1 ],
3736
[ 'km.h^-1', 'm.s^-1', 0.27777777777778 ],
3837
[ 'm.s^-1', 'km.h^-1', 3.6 ],

tests/FunctionalTest/bootstrap.php

Lines changed: 0 additions & 10 deletions
This file was deleted.

0 commit comments

Comments
 (0)