public function testTitle() { $action = new Action('add-item', 'http://api.x.io/orders/42/items'); $action->setTitle('Add Item'); $expectedJson = json_encode(array('name' => 'add-item', 'href' => 'http://api.x.io/orders/42/items', 'method' => 'GET', 'title' => 'Add Item')); $this->assertJsonStringEqualsJsonString($expectedJson, json_encode($action)); }