7 declare(strict_types=1);
23 private $schemaTypeMock;
40 $this->requestMock = $this->getMockBuilder(RequestInterface::class)->getMock();
41 $this->schemaTypeMock = $this->getMockBuilder(SchemaTypeInterface::class)->getMock();
49 'request' => $this->requestMock,
54 'test' => $this->schemaTypeMock
68 $this->requestMock->expects($this->atLeastOnce())
72 $this->schemaTypeMock->expects($this->any())
73 ->method(
'getCode')->willReturn(
'test');
75 $this->schemaTypeMock->expects($this->once())
76 ->method(
'getSchemaUrlPath')
77 ->willReturn(
'/test');
79 $this->assertEquals(
'/test', $this->index->getSchemaUrl());
89 $this->requestMock->expects($this->atLeastOnce())
91 ->willReturn(
'invalid');
93 $this->schemaTypeMock->expects($this->any())
94 ->method(
'getCode')->willReturn(
'test');
96 $this->expectException(\UnexpectedValueException::class);
98 $this->index->getSchemaUrl();
testGetSchemaUrlInvalidType()
testGetSchemaUrlValidType()