1
1
Fork 0
mirror of https://code.mensbeam.com/MensBeam/Arsse.git synced 2024-12-23 09:02:41 +00:00
Arsse/tests/cases/Db/TestResultEmpty.php

39 lines
1 KiB
PHP
Raw Normal View History

<?php
declare(strict_types=1);
2017-12-22 03:47:19 +00:00
namespace JKingWeb\Arsse\TestCase\Db;
use JKingWeb\Arsse\Db\ResultEmpty;
/** @covers \JKingWeb\Arsse\Db\ResultEmpty<extended> */
2017-12-22 03:47:19 +00:00
class TestResultEmpty extends \JKingWeb\Arsse\Test\AbstractTest {
public function testGetChangeCountAndLastInsertId() {
2017-12-22 03:47:19 +00:00
$r = new ResultEmpty;
$this->assertEquals(0, $r->changes());
$this->assertEquals(0, $r->lastId());
}
public function testIterateOverResults() {
$rows = [];
2017-12-22 03:47:19 +00:00
foreach (new ResultEmpty as $index => $row) {
$rows[$index] = $row['col'];
}
$this->assertEquals([], $rows);
}
public function testGetSingleValues() {
2017-12-22 03:47:19 +00:00
$test = new ResultEmpty;
$this->assertSame(null, $test->getValue());
}
public function testGetRows() {
2017-12-22 03:47:19 +00:00
$test = new ResultEmpty;
$this->assertSame(null, $test->getRow());
}
public function testGetAllRows() {
2017-12-22 03:47:19 +00:00
$test = new ResultEmpty;
$rows = [];
$this->assertEquals($rows, $test->getAll());
}
2017-11-30 03:42:50 +00:00
}