Issue #3987. Add option cleanup for skip cleanup #3996

Merged
merged 5 commits into from Feb 12, 2017

Conversation

Projects
None yet
4 participants
@alexpts
Contributor

alexpts commented Feb 5, 2017

Add option cleanup for DataFactory. If option cleanup in DataFactory config set to FALSE that don`t need delete records by self.
Also move create default story for new method for more flexible extend it.

Default option cleanup is TRUE for save old behavior.

alexpts added some commits Feb 5, 2017

Issue #3987. Add option cleanup for skip cleanup
Add option cleanup for DataFactory. If option cleanup in DataFactory config set to FALSE that don`t need delete records by self.
Also move create default story for new method for more flexible extend it. 

Default option cleanup is TRUE for save old behavior.
Issue #3987. Add new option to doc
Add option cleanup to example doc
Issue #3987. Add option cleanup
Remove comment
src/Codeception/Module/DataFactory.php
+ */
+ protected function getStore()
+ {
+ return $this->ormModule instanceof DataMappe

This comment has been minimized.

@edno

edno Feb 5, 2017

Contributor

Incorrect class name for DataMapper (r is missing, and maybe some test cases since the code passed the current tests).

@edno

edno Feb 5, 2017

Contributor

Incorrect class name for DataMapper (r is missing, and maybe some test cases since the code passed the current tests).

This comment has been minimized.

@DavertMik

DavertMik Feb 5, 2017

Member

Yeah, this module really lacks integration tests :(
To be honest it is pretty hard to set up them.

@DavertMik

DavertMik Feb 5, 2017

Member

Yeah, this module really lacks integration tests :(
To be honest it is pretty hard to set up them.

This comment has been minimized.

@alexpts

alexpts Feb 6, 2017

Contributor

Thanks for CR.
I will fix typo error, but tests...

I can`t research and add functional tests now.
Do we will can to add this PR without test? Now I don`t find tests for DataFactory module - https://github.com/Codeception/Codeception/tree/2.2/tests/unit/Codeception/Module

@alexpts

alexpts Feb 6, 2017

Contributor

Thanks for CR.
I will fix typo error, but tests...

I can`t research and add functional tests now.
Do we will can to add this PR without test? Now I don`t find tests for DataFactory module - https://github.com/Codeception/Codeception/tree/2.2/tests/unit/Codeception/Module

src/Codeception/Module/DataFactory.php
+ {
+ return $this->ormModule instanceof DataMapper
+ ? new RepositoryStore($this->ormModule->_getEntityManager()) // for Doctrine
+ : new ModelStore();

This comment has been minimized.

@Naktibalda

Naktibalda Feb 7, 2017

Member

What is this ModelStore class? There is no use statement for it.

@Naktibalda

Naktibalda Feb 7, 2017

Member

What is this ModelStore class? There is no use statement for it.

This comment has been minimized.

@alexpts

alexpts Feb 8, 2017

Contributor

You right, here must be null instead default ModelStore

@alexpts

alexpts Feb 8, 2017

Contributor

You right, here must be null instead default ModelStore

This comment has been minimized.

@alexpts

alexpts Feb 8, 2017

Contributor

@Naktibalda, I fixed it

@alexpts

alexpts Feb 8, 2017

Contributor

@Naktibalda, I fixed it

@Naktibalda Naktibalda merged commit 5a7df75 into Codeception:2.2 Feb 12, 2017

4 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
semaphoreci The build passed on Semaphore.
Details
wercker/build Wercker pipeline passed
Details
@alexpts

This comment has been minimized.

Show comment
Hide comment
@alexpts

alexpts Feb 12, 2017

Contributor

Thanks :)

Contributor

alexpts commented Feb 12, 2017

Thanks :)

chris1312 added a commit to chris1312/Codeception that referenced this pull request Jun 16, 2017

[DataMapper] Add option cleanup for skip cleanup (#3996)
* Add option cleanup for skip cleanup

Add option cleanup for DataFactory. If option cleanup in DataFactory config set to FALSE that don`t need delete records by self.
Also move create default story for new method for more flexible extend it.

Default option cleanup is TRUE for save old behavior.

Closes #3987
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment