* @since 2015/06/04 */ class TestExample extends BasicTestCase { /** * ALWAYS USE ONE OF THE BELOW TEST EXAMPLE FOR ANY METHOD OR FUNCTION YOU ARE WRITING TESTS FOR * * THE MORE STRICT ONE IS THE LAST ONE test_method_have_same_foot_print() */ /** * @test */ public function test_method_have_same_parameters() { $fixture = array( 'required1', 'required2', 'optional1', 'optional2', 'optional3' ); $this->assertThatMethodHaveSameParameters('Exadra37\PackageName\Repositories\UsersRepository', 'getUsers', $fixture); } /** * @test */ public function test_method_have_same_foot_print() { $footPrint = 'Parameters [5] { Parameter #0 [ $required1 ] Parameter #1 [ $required2 ] Parameter #2 [ $optional1 = true ] Parameter #3 [ $optional2 = 0 ] Parameter #4 [ $optional3 = false ]'; $this->assertThatMethodHaveSameFootPrint('Exadra37\PackageName\Repositories\UsersRepository', 'getUsers', $footPrint); } }