Angejia\Pea\MetaTest::testPrefixForTable PHP Method

testPrefixForTable() public method

public testPrefixForTable ( )
    public function testPrefixForTable()
    {
        $redis = M::mock(Redis::class);
        // schema version
        $redis->shouldReceive('get')->with('2d23e940e190c4fefe3955fe8cf5c8a8')->andReturn(1);
        // update version
        $redis->shouldReceive('get')->with('1031d621441d2f689f95870d86225cf2')->andReturn(6);
        $meta = new RedisMeta($redis);
        $prefix = $meta->prefix('angejia', 'user', true);
        $this->assertEquals('pea:angejia:user:1:6', $prefix);
    }