From 4b1ec94e3fb33bb7c50fb0ca746ecbf520f52326 Mon Sep 17 00:00:00 2001 From: PJ Dietz Date: Mon, 31 Jul 2017 22:11:29 -0400 Subject: [PATCH] Update NextMock --- test/src/Doubles/NextMock.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/test/src/Doubles/NextMock.php b/test/src/Doubles/NextMock.php index 02015ff..92a4ab0 100644 --- a/test/src/Doubles/NextMock.php +++ b/test/src/Doubles/NextMock.php @@ -10,6 +10,7 @@ class NextMock public $called = false; public $request = null; public $response = null; + public $upstreamResponse = null; public function __invoke( ServerRequestInterface $request, @@ -18,6 +19,10 @@ class NextMock $this->called = true; $this->request = $request; $this->response = $response; - return $response; + if ($this->upstreamResponse) { + return $this->upstreamResponse; + } else { + return $response; + } } }