/** * Test configuration. */ public function testConfigure() { $object = new Dummy(); $object->configure(array('foo' => 'foo')); $this->assertEquals('foo', $object->foo); try { $object->configure(array('bar' => 'bar')); $this->assertNull($object->bar); } catch (\Paytrail\Exception\PropertyDoesNotExist $e) { // this is the expected outcome. } }