From c9afc27ab9ea62269967df14a80581ed51ba6c71 Mon Sep 17 00:00:00 2001 From: Igor Scheller Date: Tue, 25 Sep 2018 16:46:37 +0200 Subject: Tests: Moved ServiceProvider::setExpects to TestCase --- tests/Unit/TestCase.php | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 tests/Unit/TestCase.php (limited to 'tests/Unit/TestCase.php') diff --git a/tests/Unit/TestCase.php b/tests/Unit/TestCase.php new file mode 100644 index 00000000..117fba88 --- /dev/null +++ b/tests/Unit/TestCase.php @@ -0,0 +1,37 @@ +once(); + } + + $invocation = $object->expects($times) + ->method($method); + + if (is_null($arguments)) { + $invocation->withAnyParameters(); + } else { + call_user_func_array([$invocation, 'with'], $arguments); + } + + if (!is_null($return)) { + $invocation->willReturn($return); + } + } +} -- cgit v1.2.3-54-g00ecf