Merge pull request #635 from flightphp/fix/view-tests-in-windows

fix: corrected windows line endings in view tests
event-tweaks
n0nag0n 3 weeks ago committed by GitHub
commit 12725eb337
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -13,7 +13,7 @@
{
"name": "Franyer Sánchez",
"email": "franyeradriansanchez@gmail.com",
"homepage": "https://faslatam.000webhostapp.com",
"homepage": "https://faslatam.42web.io",
"role": "Maintainer"
},
{
@ -44,11 +44,11 @@
"flightphp/runway": "^0.2.3 || ^1.0",
"league/container": "^4.2",
"level-2/dice": "^4.0",
"phpstan/extension-installer": "^1.3",
"phpstan/phpstan": "^1.10",
"phpunit/phpunit": "^9.5",
"phpstan/extension-installer": "^1.4",
"phpstan/phpstan": "^2.1",
"phpunit/phpunit": "^9.6",
"rregeer/phpunit-coverage-check": "^0.3.1",
"squizlabs/php_codesniffer": "^3.8"
"squizlabs/php_codesniffer": "^3.11"
},
"config": {
"allow-plugins": {

@ -31,6 +31,7 @@
<exclude name="Generic.Formatting.MultipleStatementAlignment.NotSameWarning" />
<exclude name="Generic.Functions.OpeningFunctionBraceBsdAllman.BraceOnSameLine" />
<exclude name="Generic.PHP.DisallowRequestSuperglobal.Found" />
<exclude name="Generic.WhiteSpace.DisallowSpaceIndent.SpacesUsedHeredocCloser" />
</rule>
<rule ref="Generic.Files.LineLength">
<properties>

@ -209,7 +209,7 @@ class FlightTest extends TestCase
Flight::route('/path1/@param:[a-zA-Z0-9]{2,3}', function () {
echo 'I win';
}, false, 'path1');
$url = Flight::getUrl('path1', [ 'param' => 123 ]);
$url = Flight::getUrl('path1', ['param' => 123]);
$this->assertEquals('/path1/123', $url);
}
@ -316,7 +316,7 @@ class FlightTest extends TestCase
Flight::register('response', $mock_response_class_name);
Flight::route('/stream', function () {
echo 'stream';
})->streamWithHeaders(['Content-Type' => 'text/plain', 'X-Test' => 'test', 'status' => 200 ]);
})->streamWithHeaders(['Content-Type' => 'text/plain', 'X-Test' => 'test', 'status' => 200]);
Flight::request()->url = '/stream';
$this->expectOutputString('stream');
Flight::start();

@ -220,20 +220,22 @@ class ViewTest extends TestCase
public static function renderDataProvider(): array
{
$html1 = <<<'html'
<div>Hi</div>
<div></div>
<div>Hi</div>
<div></div>
html;
html;
$html2 = <<<'html'
<input type="number" />
<input type="number" />
<input type="text" />
<input type="text" />
html;
html;
$html1 = str_replace("\n", PHP_EOL, $html1);
$html2 = str_replace("\n", PHP_EOL, $html2);
return [
[
$html1,

@ -54,7 +54,7 @@ class RouteCommandTest extends TestCase
protected function newApp(string $name, string $version = '')
{
$app = new Application($name, $version ?: '0.0.1', fn () => false);
$app = new Application($name, $version ?: '0.0.1', fn() => false);
return $app->io(new Interactor(static::$in, static::$ou));
}

Loading…
Cancel
Save