Google\Cloud\Tests\Datastore\DatastoreSessionHandlerTest::testReadNothing PHP Method

testReadNothing() public method

public testReadNothing ( )
    public function testReadNothing()
    {
        $this->datastore->transaction()->shouldBeCalledTimes(1)->willReturn($this->transaction->reveal());
        $key = new Key('projectid');
        $key->pathElement(self::KIND, 'sessionid');
        $this->datastore->key(self::KIND, 'sessionid', ['namespaceId' => self::NAMESPACE_ID])->shouldBeCalledTimes(1)->willReturn($key);
        $datastoreSessionHandler = new DatastoreSessionHandler($this->datastore->reveal());
        $datastoreSessionHandler->open(self::NAMESPACE_ID, self::KIND);
        $ret = $datastoreSessionHandler->read('sessionid');
        $this->assertEquals('', $ret);
    }