save() public method

public save ( array $options = [] )
$options array
Esempio n. 1
0
 public function testInsertCustomFields()
 {
     $post = new Post();
     $post->save();
     $post->meta->username = '******';
     $post->meta->url = 'http://grossi.io';
     $post->save();
     $post = Post::find($post->ID);
     $this->assertEquals($post->meta->username, 'juniorgrossi');
     $this->assertEquals($post->meta->url, 'http://grossi.io');
 }