public function testBasicMethods() { $seed = array('from' => '*****@*****.**', 'to' => '*****@*****.**', 'subject' => 'Howdy yoozi.', 'content' => 'hi there.'); $message = new Message(); foreach ($seed as $key => $val) { $message->{$key}($val); } $this->assertEquals($seed, $message->toArray()); $this->assertEquals(json_encode($seed), $message->toJson()); // For magic methods. $message->from = '*****@*****.**'; $this->assertEquals('*****@*****.**', $message->from); }