SevenShores\Hubspot\Tests\Integration\Resources\OwnersTest::update PHP Метод

update() публичный Метод

public update ( )
    public function update()
    {
        $email = uniqid('test_email') . '@hubspot.com';
        $owner = $this->createOwner($email);
        $ownerData = $owner->toArray();
        //update email
        $email = 'new_' . $email;
        $ownerData['email'] = $email;
        $response = $this->owners->update($owner->ownerId, $ownerData);
        $this->assertEquals(204, $response->getStatusCode());
        //request again to ensure its updated
        $response = $this->owners->getById($owner->ownerId);
        $this->assertSame(200, $response->getStatusCode());
        $this->assertSame($email, $response->email);
    }