function testImageSizes() { $pid = $this->factory->post->create(); $filename = self::copyTestImage('arch.jpg'); $attachment = array('post_title' => 'The Arch', 'post_content' => ''); $iid = wp_insert_attachment($attachment, $filename, $pid); $image = new TimberImage($iid); $this->assertEquals(1500, $image->width()); $this->assertEquals(1000, $image->height()); $this->assertEquals($pid, $image->parent()->id); $this->assertEquals(1.5, $image->aspect()); }