1
0
mirror of https://github.com/danog/psalm.git synced 2025-01-21 21:31:13 +01:00

Split up test

This commit is contained in:
Matthew Brown 2020-03-29 18:28:49 -04:00
parent d84c5db7ae
commit 32d5c92428

View File

@ -801,11 +801,15 @@ class TypeAlgebraTest extends \Psalm\Tests\TestCase
class Bar extends Foo {}
class Bat extends Foo {}',
],
'explicitValuesInOr' => [
'explicitValuesInOrIf' => [
'<?php
$s = rand(0, 1) ? "a" : "b";
if (($s === "a" && rand(0, 1)) || ($s === "b" && rand(0, 1))) {}
if (($s === "a" && rand(0, 1)) || ($s === "b" && rand(0, 1))) {}',
],
'explicitValuesInOrTernary' => [
'<?php
$s = rand(0, 1) ? "a" : "b";
$a = (($s === "a" && rand(0, 1)) || ($s === "b" && rand(0, 1))) ? 1 : 0;',
],