Skip to content
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

Statamic 5: Simplify TestCase #267

Merged
merged 4 commits into from
Apr 10, 2024
Merged

Statamic 5: Simplify TestCase #267

merged 4 commits into from
Apr 10, 2024

Conversation

duncanmcclean
Copy link
Member

@duncanmcclean duncanmcclean commented Apr 10, 2024

This pull request simplifies the addon's TestCase, thanks to statamic/cms#9573.

I've also removed the custom partialMock method which no longer seems to be needed, the assertContainsHtml assertion which we don't seem to be using anywhere and the ConsoleKernel which also doesn't seem to be getting used.

I'm not sure which "earlier versions of Laravel" this is referring to but the test suite seems to pass without it so I presume it's no longer needed.
@duncanmcclean duncanmcclean merged commit ee259e8 into statamic-5 Apr 10, 2024
22 checks passed
@duncanmcclean duncanmcclean deleted the simplify-test-case branch April 10, 2024 14:48
@ryanmitchell
Copy link
Contributor

hmm since this has merged a lot of the tests arent performing any assertions:

CleanShot 2024-04-11 at 06 32 30@2x

@duncanmcclean
Copy link
Member Author

I think that may be related to the PHPUnit version. I'll take a look today.

ryanmitchell added a commit that referenced this pull request Jul 1, 2024
* Add upgrade note to readme

* Missing update script

* Correct file path to migration

* Lets not exclude parent

* Split forms and form submissions, provide Eloquent Submission Repository and Query Builder (#177)

* Add upgrade note to readme

* Begin split configs

* Use form handle to relate, rather then a database id

* Defer to core methods for retrieving submissions

* Update fresh migrations and add migration for existing installs

* Eloquent FormRepository

* Fix migration

* Dont force a model type or it can't be overwritten

* Missing update script

* Correct file path to migration

* Lets not exclude parent

* StyleCI

* Actually run update script

* Prep for Statamic 5

* Update dev dependencies

* Try again

* Meh

* Remove deprecated test functions

* static

* Migrate PHP unit config

* Fix migration

* Fix tests to use handle instead of id

* Bug fixes

* Fix form listing bugs

* Split migration publish tags (#266)

* Split migration tags

* fix everything

* Merge branch '5.x-support' into split-migration-tags

* Ignore `.phpunit.cache`

---------

Co-authored-by: Ryan Mitchell <[email protected]>

* Statamic 5: Simplify `TestCase` (#267)

* Simplify `TestCase`

* Remove `partialMock` method from `TestCase`

I'm not sure which "earlier versions of Laravel" this is referring to but the test suite seems to pass without it so I presume it's no longer needed.

* doesn't look like we're using this method either

* The `ConsoleKernel` isn't needed

* Make drivers opt-in, rather than opt-out (#268)

* Eloquent driver should be opt-in, not opt-out

* Swap all drivers to `eloquent` in our `TestCase`

* Drop status on entries (#228)

* Fix asset import bug

* Drop status on entries

* Revert "Fix asset import bug"

This reverts commit 35ebe65.

* Fix test

* StyleCI

* Revert

* Proper update script

* Make status nullable in down migration

* Statamic 5: Docs Refresh (#254)

* Initial docs refresh

* Fix tpyo

* Missing space

---------

Co-authored-by: Ryan Mitchell <[email protected]>

* Support mapped data columns

* Add tests and fix test errors by freezing time

* Update `AddonTestCase` import

* Fix failing tests in `EntryQueryBuilderTest` (#275)

* Fix failing tests in `EntryQueryBuilderTest`

* dont need to freeze time for this test

* 🍺

* 🍺

* Remove accidental testcase addition

* Avoid make()-ing

* Refactor out hooks

* Add test coverage after bringin data into COLUMNS

* Not array_keys

* Add assertion that it doesnt save the field to the data column

* 🍺

* Remove `@test` in favour of #[Test]

* Remove ::hook calls

* 🍺

---------

Co-authored-by: Duncan McClean <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants