public function __sleep() { $keys = parent::__sleep(); // TODO-20130327: is this necessary? if (isset($this->template)) { $keys['template'] = 'template'; } return $keys; }
public function test_updated_at() { $node = new Node(); $this->assertInstanceOf('ICanBoogie\\DateTime', $node->updated_at); $this->assertTrue($node->updated_at->is_empty); $node->updated_at = 'now'; $this->assertInstanceOf('ICanBoogie\\DateTime', $node->updated_at); $this->assertArrayHasKey('updated_at', $node->__sleep()); $this->assertArrayHasKey('updated_at', $node->to_array()); }