public function testPostThumbnail() { $post = Post::find(59); $this->assertTrue($post->thumbnail->attachment instanceof Corcel\Attachment); $this->assertContains('hoodie_6_front.jpg', $post->image); $this->assertContains('/uploads/', $post->image); }
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'); }
public function testAuthorFields() { $post = Post::find(1); $this->assertEquals($post->author->display_name, 'admin'); $this->assertEquals($post->author->user_email, '*****@*****.**'); }
public function testPostFormat() { $post = Post::find(3); $this->assertEquals('video', $post->getFormat()); $post = Post::find(1); $this->assertFalse($post->getFormat()); }