Skip to content

Commit d174a9a

Browse files
committed
Fix tests and unskip more sqlite skips.
1 parent 89ce62f commit d174a9a

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

tests/TestCase/ToolbarServiceTest.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ public function setUp(): void
5757
$this->events = new EventManager();
5858

5959
$connection = ConnectionManager::get('test');
60-
$this->skipIf($connection->getDriver() instanceof Sqlite, 'Schema insertion/removal breaks SQLite');
6160
$this->restore = $GLOBALS['__PHPUNIT_BOOTSTRAP'];
6261
unset($GLOBALS['__PHPUNIT_BOOTSTRAP']);
6362
}
@@ -303,7 +302,7 @@ public function testInjectScriptsLastBodyTag()
303302
$bar = new ToolbarService($this->events, []);
304303
$bar->loadPanels();
305304
$row = $bar->saveData($request, $response);
306-
$response = $bar->injectScripts($row, $response);
305+
$response = $bar->injectScripts($row, $request, $response);
307306

308307
$timeStamp = filemtime(Plugin::path('DebugKit') . 'webroot' . DS . 'js' . DS . 'main.js');
309308

@@ -335,7 +334,7 @@ public function testInjectScriptsFileBodies()
335334
$bar = new ToolbarService($this->events, []);
336335
$row = new RequestEntity(['id' => 'abc123']);
337336

338-
$result = $bar->injectScripts($row, $response);
337+
$result = $bar->injectScripts($row, $request, $response);
339338
$this->assertInstanceOf('Cake\Http\Response', $result);
340339
$this->assertSame(file_get_contents(__FILE__), '' . $result->getBody());
341340
$this->assertTrue($result->hasHeader('X-DEBUGKIT-ID'), 'Should have a tracking id');
@@ -361,7 +360,7 @@ public function testInjectScriptsStreamBodies()
361360
$bar = new ToolbarService($this->events, []);
362361
$row = new RequestEntity(['id' => 'abc123']);
363362

364-
$result = $bar->injectScripts($row, $response);
363+
$result = $bar->injectScripts($row, $request, $response);
365364
$this->assertInstanceOf('Cake\Http\Response', $result);
366365
$this->assertSame('I am a teapot!', (string)$response->getBody());
367366
}
@@ -385,7 +384,7 @@ public function testInjectScriptsNoModifyResponse()
385384
$bar->loadPanels();
386385

387386
$row = $bar->saveData($request, $response);
388-
$response = $bar->injectScripts($row, $response);
387+
$response = $bar->injectScripts($row, $request, $response);
389388
$this->assertTextEquals('{"some":"json"}', (string)$response->getBody());
390389
$this->assertTrue($response->hasHeader('X-DEBUGKIT-ID'), 'Should have a tracking id');
391390
}

0 commit comments

Comments
 (0)