Google\Cloud\Tests\Datastore\TransactionTest::testUpsert PHP Method

testUpsert() public method

public testUpsert ( )
    public function testUpsert()
    {
        $e = $this->prophesize(Entity::class);
        $this->operation->mutation(Argument::exact('upsert'), Argument::type(Entity::class), Argument::exact(Entity::class, null))->shouldBeCalled()->willReturn(null);
        $this->operation->commit()->shouldNotBeCalled();
        $this->transaction->setOperation($this->operation->reveal());
        $this->transaction->upsert($e->reveal());
    }