assertEquals($reason, $rejection->getReason()); } public function testGetData() { $rejection = new Rejection('', 'data'); $this->assertEquals('data', $rejection->getData()); $rejection = new Rejection('', ['a' => 'b']); $this->assertEquals('b', $rejection->getData('a')); $this->assertNull($rejection->getData('nope')); $this->assertEquals('default', $rejection->getData('nope', 'default')); $this->assertEquals(['a' => 'b'], $rejection->getData()); } }