Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"phpunit/phpcov": "^9.0.2 || ^10.0",
"phpunit/phpunit": "^10.5.16 || ^11.2",
"predis/predis": "^1.1 || ^2.3",
"rector/rector": "2.0.8",
"rector/rector": "2.0.9",
"shipmonk/phpstan-baseline-per-identifier": "^2.0"
},
"replace": {
Expand Down
6 changes: 3 additions & 3 deletions tests/system/Database/Live/ForgeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,7 @@
$this->forge->dropTable('', true);
}

public function testForeignKey(): void

Check warning on line 494 in tests/system/Database/Live/ForgeTest.php

View workflow job for this annotation

GitHub Actions / DatabaseLive (8.2, OCI8, 8.0) / tests

Took 2.8327s from 0.5000s limit to run CodeIgniter\\Database\\Live\\ForgeTest::testForeignKey
{
$this->forge->dropTable('forge_test_invoices', true);
$this->forge->dropTable('forge_test_users', true);
Expand Down Expand Up @@ -1233,7 +1233,7 @@
$this->forge->dropTable('forge_test_1', true);
}

public function testSetKeyNames(): void

Check warning on line 1236 in tests/system/Database/Live/ForgeTest.php

View workflow job for this annotation

GitHub Actions / DatabaseLive (8.2, OCI8, 8.0) / tests

Took 1.0426s from 0.5000s limit to run CodeIgniter\\Database\\Live\\ForgeTest::testSetKeyNames
{
$this->forge->dropTable('forge_test_1', true);

Expand Down Expand Up @@ -1292,7 +1292,7 @@
$this->forge->dropKey('forge_test_1', $index, false);
$this->forge->dropKey('forge_test_1', $uniqueIndex, false);

$this->assertCount(0, $this->db->getIndexData('forge_test_1'));
$this->assertEmpty($this->db->getIndexData('forge_test_1'));

$this->forge->dropTable('forge_test_1', true);
}
Expand Down Expand Up @@ -1500,7 +1500,7 @@
$this->assertFalse($this->db->tableExists('dropTest'));

if ($this->db->DBDriver === 'SQLite3') {
$this->assertCount(0, $this->db->getIndexData('droptest'));
$this->assertEmpty($this->db->getIndexData('droptest'));
}
}

Expand Down Expand Up @@ -1580,7 +1580,7 @@
$this->forge->dropTable('forge_test_four', true);
}

public function testDropKey(): void

Check warning on line 1583 in tests/system/Database/Live/ForgeTest.php

View workflow job for this annotation

GitHub Actions / DatabaseLive (8.2, OCI8, 8.0) / tests

Took 0.8468s from 0.5000s limit to run CodeIgniter\\Database\\Live\\ForgeTest::testDropKey
{
$this->forge->dropTable('key_test_users', true);
$keyName = 'key_test_users_id';
Expand Down Expand Up @@ -1668,12 +1668,12 @@

$indexes = $this->db->getIndexData('forge_test_users');

$this->assertCount(0, $indexes);
$this->assertEmpty($indexes);

$this->forge->dropTable('forge_test_users', true);
}

public function testProcessIndexes(): void

Check warning on line 1676 in tests/system/Database/Live/ForgeTest.php

View workflow job for this annotation

GitHub Actions / DatabaseLive (8.2, OCI8, 8.0) / tests

Took 1.4480s from 0.5000s limit to run CodeIgniter\\Database\\Live\\ForgeTest::testProcessIndexes
{
// make sure tables don't exist
$this->forge->dropTable('actions', true);
Expand Down
2 changes: 1 addition & 1 deletion tests/system/Database/Live/GetTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public function testGetWithLimitZero(): void

$jobs = $this->db->table('job')->limit(0)->get()->getResult();

$this->assertCount(0, $jobs);
$this->assertEmpty($jobs);
}

public function testGetWithLimitZeroAsAll(): void
Expand Down
2 changes: 1 addition & 1 deletion tests/system/Log/LoggerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public function testLogDoesnotLogUnhandledLevels(): void

$logs = TestHandler::getLogs();

$this->assertCount(0, $logs);
$this->assertEmpty($logs);
}

public function testLogInterpolatesMessage(): void
Expand Down
2 changes: 1 addition & 1 deletion tests/system/Models/FindModelTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ public function testFindClearsBinds(): void

// Binds should be reset to 0 after each one
$binds = $this->model->builder()->getBinds();
$this->assertCount(0, $binds);
$this->assertEmpty($binds);

$query = $this->model->getLastQuery();
$this->assertCount(1, $this->getPrivateProperty($query, 'binds'));
Expand Down
6 changes: 3 additions & 3 deletions tests/system/View/ViewTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ public function testPerformanceLogging(): void
{
// Make sure debugging is on for our view
$view = new View($this->config, $this->viewsDir, $this->loader, true);
$this->assertCount(0, $view->getPerformanceData());
$this->assertEmpty($view->getPerformanceData());

$view->setVar('testString', 'Hello World');
$expected = '<h1>Hello World</h1>';
Expand All @@ -262,12 +262,12 @@ public function testPerformanceNonLogging(): void
{
// Make sure debugging is on for our view
$view = new View($this->config, $this->viewsDir, $this->loader, false);
$this->assertCount(0, $view->getPerformanceData());
$this->assertEmpty($view->getPerformanceData());

$view->setVar('testString', 'Hello World');
$expected = '<h1>Hello World</h1>';
$this->assertSame($expected, $view->renderString('<h1><?= $testString ?></h1>', [], true));
$this->assertCount(0, $view->getPerformanceData());
$this->assertEmpty($view->getPerformanceData());
}

public function testRenderLayoutExtendsCorrectly(): void
Expand Down
Loading