Closed jakubvojacek closed 1 year ago
I dont think this
protected function setUp(): void
{
QueryReflection::getRuntimeConfiguration()->utilizeSqlAst(true);
}
protected function tearDown(): void
{
QueryReflection::getRuntimeConfiguration()->utilizeSqlAst(false);
}
works properly, the tests are failing as if the AST wasnt enabled at all (which I double checked in QueryReflector by dumping the runtime config)
if (
self::getRuntimeConfiguration()->isUtilizingSqlAst()
) {
I am not very much familiar wiht phpunit, I usually use nette/tester or codeception
I think the reason that it worked for DoctrineKeyValueStyleRuleStrictTest extends RuleTestCase
but not in this PR is the different base class DbaAstInferenceTest extends TypeInferenceTestCase
.
unfortunately we cannot use a different base class here.
it seems your previous approach using a new test-suite was the right one. I have forgotten about that technical limitation of TypeInferenceTestCase
. sorry.
https://github.com/staabm/phpstan-dba/pull/570 got too messy after rebasing etc, decided to make it again from scratch