File tree Expand file tree Collapse file tree 8 files changed +33
-16
lines changed
Fixtures/FileConfigurations
Metadata/Property/Factory Expand file tree Collapse file tree 8 files changed +33
-16
lines changed Original file line number Diff line number Diff line change 1
1
<?xml version =" 1.0" ?>
2
2
3
3
<xsd : schema
4
+ xmlns =" https://api-platform.com/schema/metadata"
4
5
xmlns : xsd =" http://www.w3.org/2001/XMLSchema"
6
+ targetNamespace =" https://api-platform.com/schema/metadata"
5
7
elementFormDefault =" qualified" >
6
8
7
9
<xsd : element name =" resources" type =" resources" />
Original file line number Diff line number Diff line change 1
1
<?xml version =" 1.0" ?>
2
2
3
- <resources >
3
+ <resources xmlns =" https://api-platform.com/schema/metadata"
4
+ xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
5
+ xsi : schemaLocation =" https://api-platform.com/schema/metadata
6
+ https://api-platform.com/schema/metadata/metadata-2.0.xsd" >
4
7
<resource class =" ApiPlatform\Core\Tests\Fixtures\TestBundle\Entity\FileConfigDummy" >
5
8
<property name =" foo" >
6
9
<foo >Foo</foo >
Original file line number Diff line number Diff line change 1
1
<?xml version =" 1.0" encoding =" UTF-8" ?>
2
2
3
- <resources >
3
+ <resources xmlns =" https://api-platform.com/schema/metadata"
4
+ xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
5
+ xsi : schemaLocation =" https://api-platform.com/schema/metadata
6
+ https://api-platform.com/schema/metadata/metadata-2.0.xsd" >
4
7
<resource class =" ApiPlatform\Core\Tests\Fixtures\TestBundle\Entity\ThisDoesNotExist" >
5
8
</resource >
6
9
</resources >
Original file line number Diff line number Diff line change 1
1
<?xml version =" 1.0" ?>
2
2
3
- <resources >
3
+ <resources xmlns =" https://api-platform.com/schema/metadata"
4
+ xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
5
+ xsi : schemaLocation =" https://api-platform.com/schema/metadata
6
+ https://api-platform.com/schema/metadata/metadata-2.0.xsd" >
4
7
<resource class =" ApiPlatform\Core\Tests\Fixtures\TestBundle\Entity\Dummy" />
5
8
<resource
6
9
class =" ApiPlatform\Core\Tests\Fixtures\TestBundle\Entity\FileConfigDummy"
56
59
<attribute name =" baz" >Baz</attribute >
57
60
</property >
58
61
59
- <property name =" name" description =" The dummy name" />
62
+ <property name =" name" description =" The dummy name" />
60
63
</resource >
61
64
</resources >
Original file line number Diff line number Diff line change 1
1
<?xml version =" 1.0" encoding =" UTF-8" ?>
2
2
3
- <resources >
4
- <resource class =" ApiPlatform\Core\Tests\Fixtures\TestBundle\Entity\FileConfigDummy" >
5
- <foo name =" my_op_name" />
6
- </resource >
3
+ <resources xmlns =" https://api-platform.com/schema/metadata"
4
+ xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
5
+ xsi : schemaLocation =" https://api-platform.com/schema/metadata
6
+ https://api-platform.com/schema/metadata/metadata-2.0.xsd" >
7
+ <resource class =" ApiPlatform\Core\Tests\Fixtures\TestBundle\Entity\FileConfigDummy" >
8
+ <foo name =" my_op_name" />
9
+ </resource >
7
10
</resources >
Original file line number Diff line number Diff line change 1
1
<?xml version =" 1.0" encoding =" UTF-8" ?>
2
2
3
- <resources >
4
- <resource class =" ApiPlatform\Core\Tests\Fixtures\TestBundle\Entity\FileConfigDummy" >
5
- <itemOperation name =" my_op_name" >
6
- <attribute name =" method" >POST</attribute >
7
- </itemOperation >
8
- </resource >
3
+ <resources xmlns =" https://api-platform.com/schema/metadata"
4
+ xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
5
+ xsi : schemaLocation =" https://api-platform.com/schema/metadata
6
+ https://api-platform.com/schema/metadata/metadata-2.0.xsd" >
7
+ <resource class =" ApiPlatform\Core\Tests\Fixtures\TestBundle\Entity\FileConfigDummy" >
8
+ <itemOperation name =" my_op_name" >
9
+ <attribute name =" method" >POST</attribute >
10
+ </itemOperation >
11
+ </resource >
9
12
</resources >
Original file line number Diff line number Diff line change @@ -83,7 +83,7 @@ public function testCreateWithNonexistentPropertyXml()
83
83
84
84
/**
85
85
* @expectedException \ApiPlatform\Core\Exception\InvalidArgumentException
86
- * @expectedExceptionMessageRegExp / .+Element 'foo': This element is not expected\..+/
86
+ * @expectedExceptionMessageRegExp # .+Element '\{https://api-platform.com/schema/metadata\} foo': This element is not expected\..+#
87
87
*/
88
88
public function testCreateWithInvalidXml ()
89
89
{
Original file line number Diff line number Diff line change @@ -64,7 +64,7 @@ public function testCreateWithNonexistentResourceXml()
64
64
65
65
/**
66
66
* @expectedException \ApiPlatform\Core\Exception\InvalidArgumentException
67
- * @expectedExceptionMessageRegExp / .+Element 'foo': This element is not expected\..+/
67
+ * @expectedExceptionMessageRegExp # .+Element '\{https://api-platform.com/schema/metadata\} foo': This element is not expected\..+#
68
68
*/
69
69
public function testCreateWithInvalidXml ()
70
70
{
You can’t perform that action at this time.
0 commit comments