for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace TheCodingMachine\TDBM;
use PHPUnit\Framework\TestCase;
class EmptyInnerResultIteratorTest extends TestCase
{
public function testOffsetUnset()
$iterator = new EmptyInnerResultIterator();
$this->expectException(TDBMInvalidOperationException::class);
unset($iterator[42]);
}
public function testCount()
$this->assertCount(0, $iterator);
public function testOffsetExists()
$this->assertFalse(isset($iterator[0]));
public function testOffsetSet()
$iterator[42] = 'foo';
public function testIterate()
foreach ($iterator as $elem) {
$this->fail('Iterator should be empty');
$this->assertTrue(true);
public function testOffsetGet()
$this->expectException(TDBMInvalidOffsetException::class);
$iterator[42];