Skip to content

Commit dab63a9

Browse files
committed
Make tests phpunit 7 compatible
1 parent aee0cfc commit dab63a9

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

tests/Client/Client12RequestResponsesTest.php

+9-6
Original file line numberDiff line numberDiff line change
@@ -406,12 +406,15 @@ public function testSerializerContextParametersAreAdded()
406406
$this->handlerRegistry->registerHandler(GraphNavigator::DIRECTION_SERIALIZATION, \Ex\SoapEnvelope12\Messages\GetSimpleInput::class, 'xml',
407407
function($visitor, \Ex\SoapEnvelope12\Messages\GetSimpleInput $obj, array $type, Context $context) {
408408

409-
self::assertTrue($context->hasAttribute('soapEndpoint'), 'The "soapEndpoint" attribute was not found on the context object');
410-
self::assertEquals('http://www.example.org/12', $context->getAttribute('soapEndpoint'));
409+
$this->assertTrue($context->hasAttribute('soapEndpoint'), 'The "soapEndpoint" attribute was not found on the context object');
410+
$this->assertEquals('http://www.example.org/12', $context->getAttribute('soapEndpoint'));
411411

412-
self::assertTrue($context->hasAttribute('soapOperation'), 'The "soapOperation" attribute was not found on the context object');
413-
self::assertIsArray($context->getAttribute('soapOperation'));
414-
self::assertEquals('http://www.example.org/test/getSimple', $context->getAttribute('soapOperation')['action']);
412+
$this->assertTrue($context->hasAttribute('soapOperation'), 'The "soapOperation" attribute was not found on the context object');
413+
$this->assertTrue(
414+
is_array($context->getAttribute('soapOperation')),
415+
'The "soapOperation" attribute is not of type array, but '.gettype($context->getAttribute('soapOperation'))
416+
);
417+
$this->assertEquals('http://www.example.org/test/getSimple', $context->getAttribute('soapOperation')['action']);
415418

416419
throw new SerializerHandlerAssertionsWereExecuted('Stop serialization, test has finished');
417420
}
@@ -420,7 +423,7 @@ function($visitor, \Ex\SoapEnvelope12\Messages\GetSimpleInput $obj, array $type,
420423
$client = $this->getClient();
421424

422425
// Assert that subscribing handler with assertions was executed
423-
self::expectException(SerializerHandlerAssertionsWereExecuted::class);
426+
$this->expectException(SerializerHandlerAssertionsWereExecuted::class);
424427

425428
$client->getSimple('foo');
426429
}

0 commit comments

Comments
 (0)