public function testPopulate() { $blogEntry = new BlogEntry(); $blogEntry->populate(array('id' => 1, 'postDate' => new \DateTime('2011-10-30'), 'title' => 'Welcome Blog', 'image' => 'welcome.jpg', 'summary' => 'Welcome to my new blog', 'content' => 'Main blog info')); $this->assertEquals(1, $blogEntry->id); $this->assertEquals(new \DateTime('2011-10-30'), $blogEntry->postDate); $this->assertEquals('Welcome Blog', $blogEntry->title); $this->assertEquals('welcome.jpg', $blogEntry->image); $this->assertEquals('Welcome to my new blog', $blogEntry->summary); $this->assertEquals('Main blog info', $blogEntry->content); }
public function populate(array $options = NULL) { $this->__load(); return parent::populate($options); }