Comments (4)
This is how Codeception step works.
It converts action name to words and appends all arguments.
It looks much better when you use a module that was properly designed for Codeception:
I am on page "/about"
I click "button"
I see "some text"
I aggree that Asserts step output is ugly, but there is not much we can do short of rewriting Asserts module and/or Codeception.
assertThat
is the only method that takes constraint as parameter, the output could be improved by modifying Step class to call toString
-
Codeception/src/Codeception/Step.php
Lines 169 to 179 in 7d754d1
Generating step outputs from method names is one of the main Codeception ideas, I don't thing that it can be replaced with something similar to Constraint.
from codeception.
i figured the Assert language is coming from the underlying PHPUnit. No big deal there.
Adjusting to handle Constraint objects would be fantastic. Seems like a simple thing if you'd like me to check out and submit a PR.
from codeception.
$ php codecept run unit tests/unit/Codeception/StepTest.php
Codeception PHP Testing Framework v5.0.12 https://stand-with-ukraine.pp.ua
[Seed] 109444475
Unit Tests (12) ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
✔ StepTest: Multi byte text length is measured correctly(0.74s)
✔ StepTest: Single quoted string as argument(0.00s)
✔ StepTest: See uppercase text(0.00s)
✔ StepTest: Get arguments(0.15s)
✔ StepTest: Array as argument(0.00s)
✔ StepTest: No args(0.00s)
✔ StepTest: Constraint output(0.24s) * new *
✔ StepTest: Formatted output(0.02s)
✔ StepTest: See multi line string in single line(0.00s)
✔ StepTest: Am on url(0.00s)
✔ StepTest: Get html(0.00s)
✔ StepTest: Long arguments(0.02s)
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Time: 00:05.290, Memory: 12.00 MB
OK (12 tests, 24 assertions)
from codeception.
(Sorry for posting under two accounts... This one is my work account - i forgot to switch over.)
from codeception.
Related Issues (20)
- Call to srand() with non-int fails with PHP < 8.3
- unit test case error on container HOT 2
- No way to run invividual tests in groups HOT 1
- Providing null data with Examples annotation fails HOT 3
- skip_cleanup_if_failed documentation HOT 1
- Support phpunit 11 HOT 1
- "No primary site exists" only when running unit tests - Craft 4 Pro. No issues with functional and acceptance tests in same environment HOT 4
- Using Symfony 7 Clock ClockSensitiveTrait causes a LogicException HOT 2
- Future of Codeception? HOT 4
- Can I change the format of the exception display? HOT 2
- coverage: whitelist: exclude option has no effect since PHPUnit 11.0 HOT 10
- Running with --no-ansi still uses color HOT 1
- Codeception 5 + Symfony 6 HOT 2
- Run build command without bootstrap
- [JsonException] Non-backed enums have no default serialization
- "Warning: Uninitialized string offset 1 in Parser.php:160" when using readonly on anonymous classes
- Overridden DataProvider function not being called in Codeception v5.1.2 HOT 3
- gherkin:snippets command still produces old syntax
- Show errors in HTML Test report filtering bar HOT 1
- Allow to disable coverage.serialized report and reduce memory usage.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from codeception.