@@ -60,10 +60,10 @@ |
||
60 | 60 | ]; |
61 | 61 | $usingArray = UsingTest::usingTestDataProvider(); |
62 | 62 | $data = []; |
63 | - foreach($usingArray as $usingItem){ |
|
63 | + foreach($usingArray as $usingItem) { |
|
64 | 64 | $expected = $usingItem[0]; |
65 | 65 | $using = new Using($usingItem[1],$usingItem[2],$usingItem[3]); |
66 | - foreach($base as $baseItem){ |
|
66 | + foreach($base as $baseItem) { |
|
67 | 67 | $data[] = [sprintf($baseItem[0],$expected), $baseItem[1], $baseItem[2], [$using]]; |
68 | 68 | } |
69 | 69 |
@@ -14,9 +14,9 @@ discard block |
||
14 | 14 | * @param $alias |
15 | 15 | * @dataProvider SchemaWithUsingSerializerProvider |
16 | 16 | */ |
17 | - public function testSchemaXmlSerialize($expected, $namespace,$alias, $using) |
|
17 | + public function testSchemaXmlSerialize($expected, $namespace, $alias, $using) |
|
18 | 18 | { |
19 | - $schema = new Schema($namespace,$alias,[],[],[],[],$using); |
|
19 | + $schema = new Schema($namespace, $alias, [], [], [], [], $using); |
|
20 | 20 | |
21 | 21 | $domNode = $this->writerContext->write($schema, false); |
22 | 22 | $this->TESTNODE->appendChild($domNode); |
@@ -31,13 +31,13 @@ discard block |
||
31 | 31 | '<Schema/>', null, null, [] |
32 | 32 | ], |
33 | 33 | [ |
34 | - '<Schema Namespace="DummyNameSpace"/>', "DummyNameSpace", null,[] |
|
34 | + '<Schema Namespace="DummyNameSpace"/>', "DummyNameSpace", null, [] |
|
35 | 35 | ], |
36 | 36 | [ |
37 | - '<Schema Alias="DummyAlias"/>', null, "DummyAlias",[] |
|
37 | + '<Schema Alias="DummyAlias"/>', null, "DummyAlias", [] |
|
38 | 38 | ], |
39 | 39 | [ |
40 | - '<Schema Namespace="DummyNameSpace" Alias="DummyAlias"/>', 'DummyNameSpace', "DummyAlias",[] |
|
40 | + '<Schema Namespace="DummyNameSpace" Alias="DummyAlias"/>', 'DummyNameSpace', "DummyAlias", [] |
|
41 | 41 | ] |
42 | 42 | ]; |
43 | 43 | } |
@@ -45,26 +45,26 @@ discard block |
||
45 | 45 | { |
46 | 46 | $base = [ |
47 | 47 | [ |
48 | - '<Schema>%s</Schema>', null,null |
|
48 | + '<Schema>%s</Schema>', null, null |
|
49 | 49 | |
50 | 50 | ], |
51 | 51 | [ |
52 | 52 | '<Schema Namespace="DummyNameSpace">%s</Schema>', "DummyNameSpace", null |
53 | 53 | ], |
54 | 54 | [ |
55 | - '<Schema Alias="DummyAlias">%s</Schema>',null, "DummyAlias" |
|
55 | + '<Schema Alias="DummyAlias">%s</Schema>', null, "DummyAlias" |
|
56 | 56 | ], |
57 | 57 | [ |
58 | - '<Schema Namespace="DummyNameSpace" Alias="DummyAlias">%s</Schema>','DummyNameSpace', "DummyAlias" |
|
58 | + '<Schema Namespace="DummyNameSpace" Alias="DummyAlias">%s</Schema>', 'DummyNameSpace', "DummyAlias" |
|
59 | 59 | ] |
60 | 60 | ]; |
61 | 61 | $usingArray = UsingTest::usingTestDataProvider(); |
62 | 62 | $data = []; |
63 | - foreach($usingArray as $usingItem){ |
|
63 | + foreach ($usingArray as $usingItem) { |
|
64 | 64 | $expected = $usingItem[0]; |
65 | - $using = new Using($usingItem[1],$usingItem[2],$usingItem[3]); |
|
66 | - foreach($base as $baseItem){ |
|
67 | - $data[] = [sprintf($baseItem[0],$expected), $baseItem[1], $baseItem[2], [$using]]; |
|
65 | + $using = new Using($usingItem[1], $usingItem[2], $usingItem[3]); |
|
66 | + foreach ($base as $baseItem) { |
|
67 | + $data[] = [sprintf($baseItem[0], $expected), $baseItem[1], $baseItem[2], [$using]]; |
|
68 | 68 | } |
69 | 69 | |
70 | 70 | } |
@@ -25,7 +25,8 @@ |
||
25 | 25 | $this->assertEquals($expected, $xml); |
26 | 26 | } |
27 | 27 | |
28 | - public static function documentationTestProvider(){ |
|
28 | + public static function documentationTestProvider() |
|
29 | + { |
|
29 | 30 | return [ |
30 | 31 | [ |
31 | 32 | '<Documentation><Summary>Short Summery</Summary></Documentation>', 'Short Summery', null |
@@ -16,7 +16,7 @@ discard block |
||
16 | 16 | */ |
17 | 17 | public function testDocumentationTestXmlSerialize($expected, $summery, $description) |
18 | 18 | { |
19 | - $domNode = $this->TESTNODE; |
|
19 | + $domNode = $this->TESTNODE; |
|
20 | 20 | |
21 | 21 | $dataService = new Documentation($summery, $description); |
22 | 22 | $domNode = $this->writerContext->write($dataService, false); |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | $this->assertEquals($expected, $xml); |
26 | 26 | } |
27 | 27 | |
28 | - public static function documentationTestProvider(){ |
|
28 | + public static function documentationTestProvider() { |
|
29 | 29 | return [ |
30 | 30 | [ |
31 | 31 | '<Documentation><Summary>Short Summery</Summary></Documentation>', 'Short Summery', null |
@@ -11,7 +11,7 @@ |
||
11 | 11 | { |
12 | 12 | public function getAttributeValue(): ?string; |
13 | 13 | |
14 | - public function getAttributeNullCheck():bool ; |
|
14 | + public function getAttributeNullCheck():bool; |
|
15 | 15 | |
16 | 16 | public function getAttributeForVersion(): OdataVersions; |
17 | 17 |
@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | |
15 | 15 | public function testEdmxTestXmlSerialize() |
16 | 16 | { |
17 | - $writterContext = new WriterContext(OdataVersions::THREE()); |
|
17 | + $writterContext = new WriterContext(OdataVersions::THREE()); |
|
18 | 18 | |
19 | 19 | $edmx = new Edmx(); |
20 | 20 | $domNode = $writterContext->write($edmx); |
@@ -23,8 +23,8 @@ discard block |
||
23 | 23 | $this->assertXmlStringEqualsXmlString('<edmx:Edmx xmlns="http://schemas.microsoft.com/ado/2009/11/edm" xmlns:annotations="http://schemas.microsoft.com/ado/2009/02/edm/annotation" xmlns:edmx="http://schemas.microsoft.com/ado/2007/06/edmx" xmlns:metadata="http://schemas.microsoft.com/ado/2007/08/DataServices/Metadata" Version="1.0"><edmx:DataServices metadata:DataServiceVersion="3.0"><Schema /></edmx:DataServices></edmx:Edmx>', $xml); |
24 | 24 | } |
25 | 25 | |
26 | - public function testEdmxSerializePartialSchema(){ |
|
27 | - $writterContext = new WriterContext(OdataVersions::THREE()); |
|
26 | + public function testEdmxSerializePartialSchema() { |
|
27 | + $writterContext = new WriterContext(OdataVersions::THREE()); |
|
28 | 28 | $edmx = new Edmx(); |
29 | 29 | $schema = new Schema('ODataWebV3.Northwind.Model'); |
30 | 30 | $edmx->addToDataServices($schema); |
@@ -23,7 +23,8 @@ |
||
23 | 23 | $this->assertXmlStringEqualsXmlString('<edmx:Edmx xmlns="http://schemas.microsoft.com/ado/2009/11/edm" xmlns:annotations="http://schemas.microsoft.com/ado/2009/02/edm/annotation" xmlns:edmx="http://schemas.microsoft.com/ado/2007/06/edmx" xmlns:metadata="http://schemas.microsoft.com/ado/2007/08/DataServices/Metadata" Version="1.0"><edmx:DataServices metadata:DataServiceVersion="3.0"><Schema /></edmx:DataServices></edmx:Edmx>', $xml); |
24 | 24 | } |
25 | 25 | |
26 | - public function testEdmxSerializePartialSchema(){ |
|
26 | + public function testEdmxSerializePartialSchema() |
|
27 | + { |
|
27 | 28 | $writterContext = new WriterContext(OdataVersions::THREE()); |
28 | 29 | $edmx = new Edmx(); |
29 | 30 | $schema = new Schema('ODataWebV3.Northwind.Model'); |
@@ -15,9 +15,9 @@ |
||
15 | 15 | * @param $documentation |
16 | 16 | * @dataProvider usingTestDataProvider |
17 | 17 | */ |
18 | - public function testUsingTestXmlSerialize($expected,$namespace,$alias, $documentation) |
|
18 | + public function testUsingTestXmlSerialize($expected, $namespace, $alias, $documentation) |
|
19 | 19 | { |
20 | - $using = new Using($namespace,$alias,$documentation); |
|
20 | + $using = new Using($namespace, $alias, $documentation); |
|
21 | 21 | |
22 | 22 | $domNode = $this->writerContext->write($using, false); |
23 | 23 | $this->TESTNODE->appendChild($domNode); |
@@ -15,24 +15,24 @@ |
||
15 | 15 | { |
16 | 16 | $expected = |
17 | 17 | '<EntityType Abstract="false" Name="Customer" OpenType="false" metadata:HasStream="false">' . |
18 | - ' <Key>'. |
|
19 | - ' <PropertyRef Name="CustomerId" />'. |
|
20 | - ' </Key>'. |
|
21 | - ' <NavigationProperty Name="Orders" Relationship="Model1.CustomerOrder" FromRole="Customer" ToRole="Order"/>'. |
|
22 | - ' <Property Name="CustomerId" Type="Int32" Nullable="false"/>'. |
|
23 | - ' <Property Name="FirstName" Type="String" Nullable="true" Unicode="true"/>'. |
|
24 | - ' <Property Name="LastName" Type="String" Nullable="true" Unicode="true"/>'. |
|
25 | - ' <Property Name="AccountNumber" Type="Int32" Nullable="true"/>'. |
|
18 | + ' <Key>' . |
|
19 | + ' <PropertyRef Name="CustomerId" />' . |
|
20 | + ' </Key>' . |
|
21 | + ' <NavigationProperty Name="Orders" Relationship="Model1.CustomerOrder" FromRole="Customer" ToRole="Order"/>' . |
|
22 | + ' <Property Name="CustomerId" Type="Int32" Nullable="false"/>' . |
|
23 | + ' <Property Name="FirstName" Type="String" Nullable="true" Unicode="true"/>' . |
|
24 | + ' <Property Name="LastName" Type="String" Nullable="true" Unicode="true"/>' . |
|
25 | + ' <Property Name="AccountNumber" Type="Int32" Nullable="true"/>' . |
|
26 | 26 | '</EntityType>'; |
27 | 27 | |
28 | 28 | $entity = new Entity("Customer"); |
29 | 29 | |
30 | 30 | $entity->addToKey(new PropertyRef('CustomerId')) |
31 | - ->addToProperty(new Property('CustomerId', 'Int32',false)) |
|
32 | - ->addToProperty(new Property('FirstName', 'String',true)) |
|
33 | - ->addToProperty(new Property('LastName', 'String',true)) |
|
34 | - ->addToProperty(new Property('AccountNumber', 'Int32',true)) |
|
35 | - ->addToNavigationProperty(new NavigationProperty('Orders','Model1.CustomerOrder', 'Order', 'Customer')); |
|
31 | + ->addToProperty(new Property('CustomerId', 'Int32', false)) |
|
32 | + ->addToProperty(new Property('FirstName', 'String', true)) |
|
33 | + ->addToProperty(new Property('LastName', 'String', true)) |
|
34 | + ->addToProperty(new Property('AccountNumber', 'Int32', true)) |
|
35 | + ->addToNavigationProperty(new NavigationProperty('Orders', 'Model1.CustomerOrder', 'Order', 'Customer')); |
|
36 | 36 | |
37 | 37 | $domNode = $this->writerContext->write($entity, false); |
38 | 38 | $this->TESTNODE->appendChild($domNode); |
@@ -8,103 +8,103 @@ |
||
8 | 8 | class EntityContainerTest extends TestCase |
9 | 9 | { |
10 | 10 | |
11 | - public static function getEntityContainer(){ |
|
12 | - $entityContainer = new EntityContainer("NorthwindEntities", true,null,true); |
|
11 | + public static function getEntityContainer() { |
|
12 | + $entityContainer = new EntityContainer("NorthwindEntities", true, null, true); |
|
13 | 13 | |
14 | 14 | $entitySetarray = [ |
15 | - ['Categories','NorthwindModel.Category'], |
|
16 | - ['CustomerDemographics','NorthwindModel.CustomerDemographic'], |
|
17 | - ['Customers','NorthwindModel.Customer'], |
|
18 | - ['Employees','NorthwindModel.Employee'], |
|
19 | - ['Order_Details','NorthwindModel.Order_Detail'], |
|
20 | - ['Orders','NorthwindModel.Order'], |
|
21 | - ['Products','NorthwindModel.Product'], |
|
22 | - ['Regions','NorthwindModel.Region'], |
|
23 | - ['Shippers','NorthwindModel.Shipper'], |
|
24 | - ['Suppliers','NorthwindModel.Supplier'], |
|
25 | - ['Territories','NorthwindModel.Territory'], |
|
26 | - ['Alphabetical_list_of_products','NorthwindModel.Alphabetical_list_of_product'], |
|
27 | - ['Category_Sales_for_1997','NorthwindModel.Category_Sales_for_1997'], |
|
28 | - ['Current_Product_Lists','NorthwindModel.Current_Product_List'], |
|
29 | - ['Customer_and_Suppliers_by_Cities','NorthwindModel.Customer_and_Suppliers_by_City'], |
|
30 | - ['Invoices','NorthwindModel.Invoice'], |
|
31 | - ['Order_Details_Extendeds','NorthwindModel.Order_Details_Extended'], |
|
32 | - ['Order_Subtotals','NorthwindModel.Order_Subtotal'], |
|
33 | - ['Orders_Qries','NorthwindModel.Orders_Qry'], |
|
34 | - ['Product_Sales_for_1997','NorthwindModel.Product_Sales_for_1997'], |
|
35 | - ['Products_Above_Average_Prices','NorthwindModel.Products_Above_Average_Price'], |
|
36 | - ['Products_by_Categories','NorthwindModel.Products_by_Category'], |
|
37 | - ['Sales_by_Categories','NorthwindModel.Sales_by_Category'], |
|
38 | - ['Sales_Totals_by_Amounts','NorthwindModel.Sales_Totals_by_Amount'], |
|
39 | - ['Summary_of_Sales_by_Quarters','NorthwindModel.Summary_of_Sales_by_Quarter'], |
|
40 | - ['Summary_of_Sales_by_Years','NorthwindModel.Summary_of_Sales_by_Year'], |
|
15 | + ['Categories', 'NorthwindModel.Category'], |
|
16 | + ['CustomerDemographics', 'NorthwindModel.CustomerDemographic'], |
|
17 | + ['Customers', 'NorthwindModel.Customer'], |
|
18 | + ['Employees', 'NorthwindModel.Employee'], |
|
19 | + ['Order_Details', 'NorthwindModel.Order_Detail'], |
|
20 | + ['Orders', 'NorthwindModel.Order'], |
|
21 | + ['Products', 'NorthwindModel.Product'], |
|
22 | + ['Regions', 'NorthwindModel.Region'], |
|
23 | + ['Shippers', 'NorthwindModel.Shipper'], |
|
24 | + ['Suppliers', 'NorthwindModel.Supplier'], |
|
25 | + ['Territories', 'NorthwindModel.Territory'], |
|
26 | + ['Alphabetical_list_of_products', 'NorthwindModel.Alphabetical_list_of_product'], |
|
27 | + ['Category_Sales_for_1997', 'NorthwindModel.Category_Sales_for_1997'], |
|
28 | + ['Current_Product_Lists', 'NorthwindModel.Current_Product_List'], |
|
29 | + ['Customer_and_Suppliers_by_Cities', 'NorthwindModel.Customer_and_Suppliers_by_City'], |
|
30 | + ['Invoices', 'NorthwindModel.Invoice'], |
|
31 | + ['Order_Details_Extendeds', 'NorthwindModel.Order_Details_Extended'], |
|
32 | + ['Order_Subtotals', 'NorthwindModel.Order_Subtotal'], |
|
33 | + ['Orders_Qries', 'NorthwindModel.Orders_Qry'], |
|
34 | + ['Product_Sales_for_1997', 'NorthwindModel.Product_Sales_for_1997'], |
|
35 | + ['Products_Above_Average_Prices', 'NorthwindModel.Products_Above_Average_Price'], |
|
36 | + ['Products_by_Categories', 'NorthwindModel.Products_by_Category'], |
|
37 | + ['Sales_by_Categories', 'NorthwindModel.Sales_by_Category'], |
|
38 | + ['Sales_Totals_by_Amounts', 'NorthwindModel.Sales_Totals_by_Amount'], |
|
39 | + ['Summary_of_Sales_by_Quarters', 'NorthwindModel.Summary_of_Sales_by_Quarter'], |
|
40 | + ['Summary_of_Sales_by_Years', 'NorthwindModel.Summary_of_Sales_by_Year'], |
|
41 | 41 | ]; |
42 | - foreach($entitySetarray as $es){ |
|
43 | - $entityContainer->addToEntitySet(new EntityContainer\EntitySet($es[0],$es[1])); |
|
42 | + foreach ($entitySetarray as $es) { |
|
43 | + $entityContainer->addToEntitySet(new EntityContainer\EntitySet($es[0], $es[1])); |
|
44 | 44 | } |
45 | 45 | $assocationSetArray = [ |
46 | 46 | new EntityContainer\AssociationSet("FK_Products_Categories", |
47 | 47 | "NorthwindModel.FK_Products_Categories", |
48 | - new EntityContainer\AssociationSet\End("Categories","Categories"), |
|
49 | - new EntityContainer\AssociationSet\End("Products","Products") |
|
48 | + new EntityContainer\AssociationSet\End("Categories", "Categories"), |
|
49 | + new EntityContainer\AssociationSet\End("Products", "Products") |
|
50 | 50 | ), |
51 | 51 | new EntityContainer\AssociationSet("CustomerCustomerDemo", |
52 | 52 | "NorthwindModel.CustomerCustomerDemo", |
53 | - new EntityContainer\AssociationSet\End("CustomerDemographics","CustomerDemographics"), |
|
54 | - new EntityContainer\AssociationSet\End("Customers","Customers") |
|
53 | + new EntityContainer\AssociationSet\End("CustomerDemographics", "CustomerDemographics"), |
|
54 | + new EntityContainer\AssociationSet\End("Customers", "Customers") |
|
55 | 55 | ), |
56 | 56 | new EntityContainer\AssociationSet("FK_Orders_Customers", |
57 | 57 | "NorthwindModel.FK_Orders_Customers", |
58 | - new EntityContainer\AssociationSet\End("Customers","Customers"), |
|
59 | - new EntityContainer\AssociationSet\End("Orders","Orders") |
|
58 | + new EntityContainer\AssociationSet\End("Customers", "Customers"), |
|
59 | + new EntityContainer\AssociationSet\End("Orders", "Orders") |
|
60 | 60 | ), |
61 | 61 | new EntityContainer\AssociationSet("FK_Employees_Employees", |
62 | 62 | "NorthwindModel.FK_Employees_Employees", |
63 | - new EntityContainer\AssociationSet\End("Employees","Employees"), |
|
64 | - new EntityContainer\AssociationSet\End("Employees","Employees1") |
|
63 | + new EntityContainer\AssociationSet\End("Employees", "Employees"), |
|
64 | + new EntityContainer\AssociationSet\End("Employees", "Employees1") |
|
65 | 65 | ), |
66 | 66 | new EntityContainer\AssociationSet("FK_Orders_Employees", |
67 | 67 | "NorthwindModel.FK_Orders_Employees", |
68 | - new EntityContainer\AssociationSet\End("Employees","Employees"), |
|
69 | - new EntityContainer\AssociationSet\End("Orders","Orders") |
|
68 | + new EntityContainer\AssociationSet\End("Employees", "Employees"), |
|
69 | + new EntityContainer\AssociationSet\End("Orders", "Orders") |
|
70 | 70 | ), |
71 | 71 | new EntityContainer\AssociationSet("EmployeeTerritories", |
72 | 72 | "NorthwindModel.EmployeeTerritories", |
73 | - new EntityContainer\AssociationSet\End("Employees","Employees"), |
|
74 | - new EntityContainer\AssociationSet\End("Territories","Territories") |
|
73 | + new EntityContainer\AssociationSet\End("Employees", "Employees"), |
|
74 | + new EntityContainer\AssociationSet\End("Territories", "Territories") |
|
75 | 75 | ), |
76 | 76 | new EntityContainer\AssociationSet("FK_Order_Details_Orders", |
77 | 77 | "NorthwindModel.FK_Order_Details_Orders", |
78 | - new EntityContainer\AssociationSet\End("Order_Details","Order_Details"), |
|
79 | - new EntityContainer\AssociationSet\End("Orders","Orders") |
|
78 | + new EntityContainer\AssociationSet\End("Order_Details", "Order_Details"), |
|
79 | + new EntityContainer\AssociationSet\End("Orders", "Orders") |
|
80 | 80 | ), |
81 | 81 | new EntityContainer\AssociationSet("FK_Order_Details_Products", |
82 | 82 | "NorthwindModel.FK_Order_Details_Products", |
83 | - new EntityContainer\AssociationSet\End("Order_Details","Order_Details"), |
|
84 | - new EntityContainer\AssociationSet\End("Products","Products") |
|
83 | + new EntityContainer\AssociationSet\End("Order_Details", "Order_Details"), |
|
84 | + new EntityContainer\AssociationSet\End("Products", "Products") |
|
85 | 85 | ), |
86 | 86 | new EntityContainer\AssociationSet("FK_Orders_Shippers", |
87 | 87 | "NorthwindModel.FK_Orders_Shippers", |
88 | - new EntityContainer\AssociationSet\End("Orders","Orders"), |
|
89 | - new EntityContainer\AssociationSet\End("Shippers","Shippers") |
|
88 | + new EntityContainer\AssociationSet\End("Orders", "Orders"), |
|
89 | + new EntityContainer\AssociationSet\End("Shippers", "Shippers") |
|
90 | 90 | ), |
91 | 91 | new EntityContainer\AssociationSet("FK_Products_Suppliers", |
92 | 92 | "NorthwindModel.FK_Products_Suppliers", |
93 | - new EntityContainer\AssociationSet\End("Products","Products"), |
|
94 | - new EntityContainer\AssociationSet\End("Suppliers","Suppliers") |
|
93 | + new EntityContainer\AssociationSet\End("Products", "Products"), |
|
94 | + new EntityContainer\AssociationSet\End("Suppliers", "Suppliers") |
|
95 | 95 | ), |
96 | 96 | new EntityContainer\AssociationSet("FK_Territories_Region", |
97 | 97 | "NorthwindModel.FK_Territories_Region", |
98 | - new EntityContainer\AssociationSet\End("Regions","Region"), |
|
99 | - new EntityContainer\AssociationSet\End("Territories","Territories") |
|
98 | + new EntityContainer\AssociationSet\End("Regions", "Region"), |
|
99 | + new EntityContainer\AssociationSet\End("Territories", "Territories") |
|
100 | 100 | ), |
101 | 101 | ]; |
102 | 102 | $entityContainer->setAssociationSet($assocationSetArray); |
103 | 103 | return $entityContainer; |
104 | 104 | } |
105 | 105 | |
106 | - public function testXmlSerialize(){ |
|
107 | - $domNode = $this->TESTNODE; |
|
106 | + public function testXmlSerialize() { |
|
107 | + $domNode = $this->TESTNODE; |
|
108 | 108 | $entityContainer = self::getEntityContainer(); |
109 | 109 | $domNode = $this->writerContext->write($entityContainer, false); |
110 | 110 | $this->TESTNODE->appendChild($domNode); |
@@ -8,7 +8,8 @@ discard block |
||
8 | 8 | class EntityContainerTest extends TestCase |
9 | 9 | { |
10 | 10 | |
11 | - public static function getEntityContainer(){ |
|
11 | + public static function getEntityContainer() |
|
12 | + { |
|
12 | 13 | $entityContainer = new EntityContainer("NorthwindEntities", true,null,true); |
13 | 14 | |
14 | 15 | $entitySetarray = [ |
@@ -39,7 +40,7 @@ discard block |
||
39 | 40 | ['Summary_of_Sales_by_Quarters','NorthwindModel.Summary_of_Sales_by_Quarter'], |
40 | 41 | ['Summary_of_Sales_by_Years','NorthwindModel.Summary_of_Sales_by_Year'], |
41 | 42 | ]; |
42 | - foreach($entitySetarray as $es){ |
|
43 | + foreach($entitySetarray as $es) { |
|
43 | 44 | $entityContainer->addToEntitySet(new EntityContainer\EntitySet($es[0],$es[1])); |
44 | 45 | } |
45 | 46 | $assocationSetArray = [ |
@@ -103,7 +104,8 @@ discard block |
||
103 | 104 | return $entityContainer; |
104 | 105 | } |
105 | 106 | |
106 | - public function testXmlSerialize(){ |
|
107 | + public function testXmlSerialize() |
|
108 | + { |
|
107 | 109 | $domNode = $this->TESTNODE; |
108 | 110 | $entityContainer = self::getEntityContainer(); |
109 | 111 | $domNode = $this->writerContext->write($entityContainer, false); |
@@ -14,8 +14,8 @@ discard block |
||
14 | 14 | public function testKeyElementXmlSerialize($expected, $propertyRefArray) |
15 | 15 | { |
16 | 16 | $key = new KeyElement(); |
17 | - foreach($propertyRefArray as $proRef){ |
|
18 | - $key[]=$proRef; |
|
17 | + foreach ($propertyRefArray as $proRef) { |
|
18 | + $key[] = $proRef; |
|
19 | 19 | } |
20 | 20 | $domNode = $this->writerContext->write($key, false); |
21 | 21 | $this->TESTNODE->appendChild($domNode); |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | $this->assertXmlStringEqualsXmlString($expected, $xml); |
24 | 24 | } |
25 | 25 | |
26 | - public static function KeyElementProvider(){ |
|
26 | + public static function KeyElementProvider() { |
|
27 | 27 | return [ |
28 | 28 | [ |
29 | 29 | '<Key>' . |
@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | public function testKeyElementXmlSerialize($expected, $propertyRefArray) |
15 | 15 | { |
16 | 16 | $key = new KeyElement(); |
17 | - foreach($propertyRefArray as $proRef){ |
|
17 | + foreach($propertyRefArray as $proRef) { |
|
18 | 18 | $key[]=$proRef; |
19 | 19 | } |
20 | 20 | $domNode = $this->writerContext->write($key, false); |
@@ -23,7 +23,8 @@ discard block |
||
23 | 23 | $this->assertXmlStringEqualsXmlString($expected, $xml); |
24 | 24 | } |
25 | 25 | |
26 | - public static function KeyElementProvider(){ |
|
26 | + public static function KeyElementProvider() |
|
27 | + { |
|
27 | 28 | return [ |
28 | 29 | [ |
29 | 30 | '<Key>' . |
@@ -21,7 +21,7 @@ |
||
21 | 21 | protected function setUp(): void |
22 | 22 | { |
23 | 23 | parent::setUp(); |
24 | - $this->writerContext = new WriterContext(OdataVersions::THREE()); |
|
24 | + $this->writerContext = new WriterContext(OdataVersions::THREE()); |
|
25 | 25 | $this->setContext($this->writerContext); |
26 | 26 | } |
27 | 27 |