diff --git a/tests/Camspiers/LoggerBridge/BasicBacktraceReporterTest.php b/tests/Camspiers/LoggerBridge/BasicBacktraceReporterTest.php index 908182b..9c8d099 100644 --- a/tests/Camspiers/LoggerBridge/BasicBacktraceReporterTest.php +++ b/tests/Camspiers/LoggerBridge/BasicBacktraceReporterTest.php @@ -18,8 +18,14 @@ public function testGetExceptionBacktrace() $reporter = new BasicBacktraceReporter(); $exception = new \Exception('Test'); - - $this->assertEquals($exception->getTrace(), $reporter->getBacktrace($exception)); + + $backtrace = $exception->getTrace(); + + foreach ($backtrace as $index => $backtraceCall) { + unset($backtrace[$index]['args']); + } + + $this->assertEquals($backtrace, $reporter->getBacktrace($exception)); } public function testGetGlobalBacktrace() diff --git a/tests/Camspiers/LoggerBridge/FilteredBacktraceReporterTest.php b/tests/Camspiers/LoggerBridge/FilteredBacktraceReporterTest.php index a1ceac0..cf601b1 100644 --- a/tests/Camspiers/LoggerBridge/FilteredBacktraceReporterTest.php +++ b/tests/Camspiers/LoggerBridge/FilteredBacktraceReporterTest.php @@ -27,7 +27,13 @@ public function testFilteredFunctionsBacktrace() $exception = new \Exception('Test'); - $this->assertEquals($exception->getTrace(), $reporter->getBacktrace($exception)); + $backtrace = $exception->getTrace(); + + foreach ($backtrace as $index => $backtraceCall) { + unset($backtrace[$index]['args']); + } + + $this->assertEquals($backtrace, $reporter->getBacktrace($exception)); $reporter = new FilteredBacktraceReporter( $fns = array( diff --git a/tests/Camspiers/LoggerBridge/LoggerBridgeTest.php b/tests/Camspiers/LoggerBridge/LoggerBridgeTest.php index 30727a3..33a7104 100644 --- a/tests/Camspiers/LoggerBridge/LoggerBridgeTest.php +++ b/tests/Camspiers/LoggerBridge/LoggerBridgeTest.php @@ -760,8 +760,7 @@ public function testExceptionHandler() 'Uncaught Exception: Message', $this->logicalAnd( $this->contains($exception->getFile()), - $this->contains($exception->getLine()), - $this->contains('') + $this->contains($exception->getLine()) ) ); @@ -811,11 +810,14 @@ public function testPreRequest() ); $bridge->expects($this->once()) - ->method('registerGlobalHandlers') - ->with($request = $this->getMockWithoutConstructor('SS_HTTPRequest'), $model = $this->getMockWithoutConstructor('DataModel')); + ->method('registerGlobalHandlers'); $this->assertTrue( - $bridge->preRequest($request, $this->getMockWithoutConstructor('Session'), $model) + $bridge->preRequest( + $this->getMockWithoutConstructor('SS_HTTPRequest'), + $this->getMockWithoutConstructor('Session'), + $this->getMockWithoutConstructor('DataModel') + ) ); }