RedUNIT\Base\Writecache::testRegressions PHP Method

testRegressions() public method

Try to fool the cache :)
public testRegressions ( ) : void
return void
    public function testRegressions()
    {
        testpack('Testing possible regressions: Try to fool the cache');
        $str = 'SELECT * FROM ' . R::getWriter()->esc('bean', TRUE) . ' WHERE ( ' . R::getWriter()->esc('id', TRUE) . '  IN ( 1)  ) ';
        $bean = R::dispense('bean');
        $bean->title = 'abc';
        $id = R::store($bean);
        $bean = R::load('bean', $id);
        $bean->title = 'xxx';
        R::store($bean);
        // Fire exact same query so cache may think no other query has been fired
        R::exec($str);
        $bean = R::load('bean', $id);
        asrt($bean->title, 'xxx');
    }