Commit graph

2 commits

Author SHA1 Message Date
Kunal Mehta
a1ab4b2c6c Use splat operator in HamcrestPHPUnitIntegration
Change-Id: I1421748fd338137dd6990775e0d79a6cfb82aa9d
2019-02-26 18:52:03 -08:00
Kunal Mehta
1a2ef35559 Add HamcrestPHPUnitIntegration trait
Hamcrest has its own assertThat() function, which is used in PHPUnit
tests. However, in PHPUnit 6, tests that don't have any assertions are
marked as risky.

To work around that, add a HamcrestPHPUnitIntegration trait that
provides a $this->assertThatHamcrest() - it wraps around Hamcrest's
assertThat(), and increments PHPUnit's assertion counter, so using it
ensures that the test is not risky.

Change-Id: Ia4a4ec226f64ebe90d1091ffd27420a356ca76ff
2018-04-12 19:52:05 -07:00