Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
TavoNiievez wants to merge1 commit intoCodeception:main
base:main
Choose a base branch
Loading
fromTavoNiievez:new_asserts

Conversation

@TavoNiievez
Copy link
Member

No description provided.

@TavoNiievez
Copy link
MemberAuthor

Hi@ThomasLandauer@xEdelweiss ,
I'm proposing adding some new assertions to the module.

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.

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');
* ```
*/
publicfunctionseeDoctrineProxyDirIsWritable(string$entityManagerName ='default'):void

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');

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Does this also work withone andthree digit versions?

* $I->seeAppEnvAndDebugMatchKernel();
* ```
*/
publicfunctionseeAppEnvAndDebugMatchKernel():void

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

  1. How is it possible that they don't mach?
  2. Are you only looking at real environment variables or also at resolved.env variables?

/**
* Helper to get the project's root directory.
*/
protectedfunctiongetProjectDir():string

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?

}

/**
* Asserts that a security firewall is configured and active.

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?

@ThomasLandauer
Copy link
Member

Well, these are many... :-)

  1. Do you have a clear picture when Codeception usually usessee vs.assert? Or at least clearer than me? ;-)
  2. Is there a reason why you're putting those Doctrine assertions in the Symfony and not in the Doctrine module?
  3. For some assertions I don't get the idea, since the outcome usually differs between TEST and PROD environment, e.g.seeDoctrineDatabaseIsUp(),seeDebugModeEnabled(). What's your reasoning here?

@xEdelweiss
Copy link
Contributor

Hi@TavoNiievez
Thanks for looping me in! Sadly, I'm not really working with Codeception/Symfony at the moment, so I don't think I can give this PR the proper attention it deserves.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

1 more reviewer

@ThomasLandauerThomasLandauerThomasLandauer left review comments

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@TavoNiievez@ThomasLandauer@xEdelweiss

[8]ページ先頭

©2009-2025 Movatter.jp