Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ nbproject/*
.svn
errors.err
tags
/.phpunit.result.cache
/nbproject/
/composer.lock
/vendor
Expand Down
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
language: php

php:
- 7.1
- 7.2
- 7.3

dist: trusty

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
},
"require-dev": {
"cakephp/cakephp-codesniffer": "dev-next",
"phpunit/phpunit": "^7.0"
"phpunit/phpunit": "^8.0"
},
"autoload": {
"psr-4": {
Expand Down
2 changes: 1 addition & 1 deletion src/Controller/MailPreviewController.php
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ public function email($name, $method)
$email = $this->findPreview($name, $method, $plugin);
$partType = $this->request->getQuery('part');

$this->viewBuilder()->setLayout(false);
$this->viewBuilder()->disableAutoLayout();

if ($partType) {
return $this->respondWithPart($email, $partType);
Expand Down
5 changes: 3 additions & 2 deletions tests/TestCase/Cache/Engine/DebugEngineTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
*/
namespace DebugKit\Test\TestCase\Cache\Engine;

use BadMethodCallException;
use Cake\TestSuite\TestCase;
use DebugKit\Cache\Engine\DebugEngine;
use DebugKit\DebugTimer;
Expand All @@ -38,7 +39,7 @@ class DebugEngineTest extends TestCase
*
* @return void
*/
public function setUp()
public function setUp(): void
{
parent::setUp();
$mock = $this->getMockBuilder('Cake\Cache\CacheEngine')->getMock();
Expand Down Expand Up @@ -66,11 +67,11 @@ public function testInitEngineBasedOnConfig()
/**
* Test that the normal errors bubble up still.
*
* @expectedException BadMethodCallException
* @return void
*/
public function testInitErrorOnInvalidConfig()
{
$this->expectException(BadMethodCallException::class);
$engine = new DebugEngine([
'className' => 'Derpy',
'path' => TMP,
Expand Down
2 changes: 1 addition & 1 deletion tests/TestCase/Controller/MailPreviewControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class MailPreviewControllerTest extends IntegrationTestCase
*
* @return void
*/
public function setUp()
public function setUp(): void
{
parent::setUp();

Expand Down
2 changes: 1 addition & 1 deletion tests/TestCase/Controller/PanelsControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class PanelsControllerTest extends IntegrationTestCase
*
* @return void
*/
public function setUp()
public function setUp(): void
{
parent::setUp();
Router::plugin('DebugKit', function (RouteBuilder $routes) {
Expand Down
2 changes: 1 addition & 1 deletion tests/TestCase/Controller/RequestsControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class RequestsControllerTest extends IntegrationTestCase
*
* @return void
*/
public function setUp()
public function setUp(): void
{
parent::setUp();
Router::plugin('DebugKit', function (RouteBuilder $routes) {
Expand Down
2 changes: 1 addition & 1 deletion tests/TestCase/Controller/ToolbarControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class ToolbarControllerTest extends IntegrationTestCase
*
* @return void
*/
public function setUp()
public function setUp(): void
{
parent::setUp();
Router::plugin('DebugKit', function (RouteBuilder $routes) {
Expand Down
2 changes: 1 addition & 1 deletion tests/TestCase/Database/Log/DebugLogTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class DebugLogTest extends TestCase
*
* @return void
*/
public function setUp()
public function setUp(): void
{
parent::setUp();
$this->logger = new DebugLog(null, 'test');
Expand Down
2 changes: 1 addition & 1 deletion tests/TestCase/DebugIncludeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public function testIncludePaths()
{
$include = new DebugInclude();
$result = $include->includePaths();
$this->assertInternalType('array', $result);
$this->assertIsArray($result);
$this->assertFileExists($result[0]);
}

Expand Down
2 changes: 1 addition & 1 deletion tests/TestCase/DebugMemoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public function testRecordNoKey()
DebugMemory::record();
$result = DebugMemory::getAll(true);
$this->assertCount(1, $result);
$this->assertContains('DebugMemoryTest.php line ' . (__LINE__ - 3), array_keys($result)[0]);
$this->assertStringContainsString('DebugMemoryTest.php line ' . (__LINE__ - 3), array_keys($result)[0]);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion tests/TestCase/DebugPanelTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class DebugPanelTest extends TestCase
*/
protected $panel;

public function setUp()
public function setUp(): void
{
parent::setUp();
$this->panel = new SimplePanel();
Expand Down
2 changes: 1 addition & 1 deletion tests/TestCase/DebugSqlTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class DebugSqlTest extends TestCase
*
* @return void
*/
public function setUp()
public function setUp(): void
{
parent::setUp();
$this->connection = ConnectionManager::get('test');
Expand Down
2 changes: 1 addition & 1 deletion tests/TestCase/DebugTimerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class DebugTimerTest extends TestCase
*
* @return void
*/
public function tearDown()
public function tearDown(): void
{
DebugTimer::clear();
}
Expand Down
2 changes: 1 addition & 1 deletion tests/TestCase/Mailer/Transport/DebugKitTransportTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

class DebugKitTransportTest extends TestCase
{
public function setUp()
public function setUp(): void
{
$this->log = new \ArrayObject();
$this->wrapped = $this->getMockBuilder(AbstractTransport::class)
Expand Down
10 changes: 5 additions & 5 deletions tests/TestCase/Middleware/DebugKitMiddlewareTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class DebugKitMiddlewareTest extends TestCase
*
* @return void
*/
public function setUp()
public function setUp(): void
{
parent::setUp();

Expand All @@ -58,7 +58,7 @@ public function setUp()
*
* @return void
*/
public function tearDown()
public function tearDown(): void
{
parent::tearDown();

Expand Down Expand Up @@ -150,8 +150,8 @@ public function testInvokeNoModifyBinaryResponse()

$this->assertEquals(1, $total, 'Should track response');
$body = $result->getBody();
$this->assertNotContains('__debug_kit', '' . $body);
$this->assertNotContains('<script', '' . $body);
$this->assertStringNotContainsString('__debug_kit', '' . $body);
$this->assertStringNotContainsString('<script', '' . $body);
}

/**
Expand Down Expand Up @@ -216,7 +216,7 @@ public function testInvokeNoModifyRequestAction()

$this->assertEquals(0, $total, 'Should not track sub-requests');
$body = $result->getBody();
$this->assertNotContains('<script', '' . $body);
$this->assertStringNotContainsString('<script', '' . $body);
}

/**
Expand Down
4 changes: 2 additions & 2 deletions tests/TestCase/Model/Behavior/TimedBehaviorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class TimedBehaviorTest extends TestCase
*
* @return void
*/
public function setUp()
public function setUp(): void
{
parent::setUp();
$this->Article = TableRegistry::get('Articles');
Expand All @@ -52,7 +52,7 @@ public function setUp()
*
* @return void
*/
public function tearDown()
public function tearDown(): void
{
parent::tearDown();
unset($this->Article);
Expand Down
2 changes: 1 addition & 1 deletion tests/TestCase/Model/Table/RequestTableTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class RequestTableTest extends TestCase
*
* @return void
*/
public function setUp()
public function setUp(): void
{
parent::setUp();
$connection = ConnectionManager::get('test');
Expand Down
4 changes: 2 additions & 2 deletions tests/TestCase/Panel/CachePanelTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class CachePanelTest extends TestCase
*
* @return void
*/
public function setUp()
public function setUp(): void
{
parent::setUp();
$this->panel = new CachePanel();
Expand All @@ -44,7 +44,7 @@ public function setUp()
*
* @return void
*/
public function tearDown()
public function tearDown(): void
{
parent::tearDown();
Cache::drop('debug_kit_test');
Expand Down
6 changes: 3 additions & 3 deletions tests/TestCase/Panel/DeprecationsPanelTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class DeprecationsPanelTest extends TestCase
*
* @return void
*/
public function setUp()
public function setUp(): void
{
parent::setUp();
DeprecationsPanel::clearDeprecatedErrors();
Expand Down Expand Up @@ -64,12 +64,12 @@ public function testShutdown()
$this->assertCount(3, $data['plugins']['DebugKit']);

$error = $data['plugins']['DebugKit'][0];
$this->assertContains('Something going away', $error['message']);
$this->assertStringContainsString('Something going away', $error['message']);
$this->assertEquals('DebugKit/tests/TestCase/Panel/DeprecationsPanelTest.php', $error['niceFile']);
$this->assertEquals(46, $error['line']);

$error = $data['plugins']['DebugKit'][2];
$this->assertContains('Raw error', $error['message']);
$this->assertStringContainsString('Raw error', $error['message']);
$this->assertEquals('DebugKit/tests/TestCase/Panel/DeprecationsPanelTest.php', $error['niceFile']);
$this->assertEquals(48, $error['line']);
}
Expand Down
6 changes: 3 additions & 3 deletions tests/TestCase/Panel/EnvironmentPanelTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class EnvironmentPanelTest extends TestCase
*
* @return void
*/
public function setUp()
public function setUp(): void
{
parent::setUp();
$this->panel = new EnvironmentPanel();
Expand All @@ -44,7 +44,7 @@ public function setUp()
*
* @return void
*/
public function tearDown()
public function tearDown(): void
{
parent::tearDown();
unset($this->panel);
Expand All @@ -63,7 +63,7 @@ public function testShutdown()

$this->panel->shutdown($event);
$output = $this->panel->data();
$this->assertInternalType('array', $output);
$this->assertIsArray($output);
$this->assertSame(['php', 'ini', 'cake', 'app'], array_keys($output));
$this->assertEquals('mysql://user:password@localhost/my_db', $output['php']['TEST_URL_1']);
}
Expand Down
2 changes: 1 addition & 1 deletion tests/TestCase/Panel/IncludePanelTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class IncludePanelTest extends TestCase
*
* @return void
*/
public function setUp()
public function setUp(): void
{
parent::setUp();
$this->panel = new IncludePanel();
Expand Down
6 changes: 3 additions & 3 deletions tests/TestCase/Panel/LogPanelTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class LogPanelTest extends TestCase
*
* @return void
*/
public function setUp()
public function setUp(): void
{
parent::setUp();
$this->panel = new LogPanel();
Expand All @@ -44,7 +44,7 @@ public function setUp()
*
* @return void
*/
public function tearDown()
public function tearDown(): void
{
parent::tearDown();
Log::drop('debug_kit_log_panel');
Expand Down Expand Up @@ -77,7 +77,7 @@ public function testData()
$result = $this->panel->data();

$this->assertArrayHasKey('logger', $result);
/* @var DebugKitLog $logger */
/** @var DebugKitLog $logger */
$logger = $result['logger'];

$this->assertInstanceOf('DebugKit\Log\Engine\DebugKitLog', $logger);
Expand Down
2 changes: 1 addition & 1 deletion tests/TestCase/Panel/PackagesPanelTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class PackagesPanelTest extends TestCase
*
* @return void
*/
public function setUp()
public function setUp(): void
{
parent::setUp();
$this->panel = new PackagesPanel();
Expand Down
2 changes: 1 addition & 1 deletion tests/TestCase/Panel/RoutesPanelTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class RoutesPanelTest extends TestCase
*
* @return void
*/
public function setUp()
public function setUp(): void
{
parent::setUp();

Expand Down
Loading