Codeception\Module\WPDb::havePostmetaInDatabase PHP Метод

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

Adds one or more meta key and value couples in the database for a post.
public havePostmetaInDatabase ( integer $post_id, string $meta_key, mixed $meta_value ) : integer
$post_id integer
$meta_key string
$meta_value mixed The value to insert in the database, objects and arrays will be serialized.
Результат integer The inserted meta `meta_id`.
    public function havePostmetaInDatabase($post_id, $meta_key, $meta_value)
    {
        if (!is_int($post_id)) {
            throw new \BadMethodCallException('Post id must be an int', 1);
        }
        if (!is_string($meta_key)) {
            throw new \BadMethodCallException('Meta key must be an string', 3);
        }
        $tableName = $this->grabPostMetaTableName();
        return $this->haveInDatabase($tableName, array('post_id' => $post_id, 'meta_key' => $meta_key, 'meta_value' => $this->maybeSerialize($meta_value)));
    }
WPDb