fixed unit tests
minor #13092 fixed unit tests (fabpot)

This PR was merged into the 2.6 branch.

Discussion
----------

fixed unit tests

see #13047

Commits
-------

1f98e60 fixed unit tests
[DependencyInjection] use/fix newest Definition::setFactory
bug #13087 [DependencyInjection] use/fix newest Definition::setFactory (nicolas-grekas)

This PR was merged into the 2.6 branch.

Discussion
----------

[DependencyInjection] use/fix newest Definition::setFactory

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

Commits
-------

f683a7a [DependencyInjection] use/fix newest Definition::setFactory
Merge branch '2.6' into 2.7

* 2.6:
  [DependencyInjection] use/fix newest Definition::setFactory
  fixed unit tests