[TYPO3-50-general] OT: flow3Unit - AOP instead of setUp/tearDown?

Martin Kutschker masi-no at spam-typo3.org
Sat Oct 30 15:48:31 CEST 2010


Hi!

phpUnit works for fine me, but I don't like many of its assertions or "extensions"  because IHMO
they have ill names *. I'm not a native speaker but to me they show a broken English. While I mused
on how they could be better and if it made more sense to file requests for phpUnit or to start a
fresh with a new jUnit port with FLOW3 a thought stroke me. What if AOP was used to create and
destroy the fixtures instead of using setUp() and tearDown()?

Would this increase or decrease the readability of the tests? Will the intention of the test become
more or less clear to the reader?

Masi

* eg IMHO it should be assertDoesNotContain() instead of assertNotContains() and assertSame() is no
real twin of assertEquals(), etc

PS:

How about:

$this->assertThat($value)->isTrue()
$this->assertThat($value1)->and($value2)->areEqual()


More information about the TYPO3-project-5_0-general mailing list