-
Notifications
You must be signed in to change notification settings - Fork 25
Add new assertions #218
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Add new assertions #218
Conversation
e1200e3
to
1e515ac
Compare
Hi @ThomasLandauer @xEdelweiss , Can you take a look at the PR and give me your opinion on the new methods, please? |
* $I->seeDoctrineDatabaseIsUp('custom'); | ||
* ``` | ||
* | ||
* @param non-empty-string $connectionName The name of the Doctrine connection to check. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mean the name of the entity manager (in case you have multiple)?
* $I->seeDoctrineProxyDirIsWritable('custom'); | ||
* ``` | ||
*/ | ||
public function seeDoctrineProxyDirIsWritable(string $entityManagerName = 'default'): void |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you aware that Doctrine is moving away from their own proxy system, in favor of the new native PHP lazy objects? So (as far as I understand it), the proxy dir soon won't be needed anymore.
* | ||
* ```php | ||
* <?php | ||
* $I->assertSymfonyVersion('>=', '6.4'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this also work with one and three digit versions?
* $I->seeAppEnvAndDebugMatchKernel(); | ||
* ``` | ||
*/ | ||
public function seeAppEnvAndDebugMatchKernel(): void |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- How is it possible that they don't mach?
- Are you only looking at real environment variables or also at resolved
.env
variables?
/** | ||
* Helper to get the project's root directory. | ||
*/ | ||
protected function getProjectDir(): string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I usually do it like this:
$kernel = $I->grabService('kernel');
$kernel->getContainer()->getParameter('foobar');
Is this just a shortcut? I'm asking cause if there's a shortcut for this one parameter, I always ask myself: What about all the others?
@@ -147,6 +152,100 @@ public function seeUserPasswordDoesNotNeedRehash(?UserInterface $user = null): v | |||
$this->assertFalse($hasher->needsRehash($userToValidate), 'User password needs rehash.'); | |||
} | |||
|
|||
/** | |||
* Asserts that a security firewall is configured and active. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Active" in the sense that it was actually used for the current request? Or just generally up and running?
Well, these are many... :-)
|
No description provided.